Compare commits

...

9 Commits

Author SHA1 Message Date
vits71 3114c9d3f1
Merge 739ff4d637 into 7eeb1b6c38 2025-05-02 10:55:55 -04:00
Yasser Yassine 7eeb1b6c38 Device: Refactor ComponentVersions
Also:
- Add setGenericData()
- Add ExtendedResponseFilter
2025-04-30 18:49:35 +00:00
Kyle Schwarz b1e875980c Communication: Rename Ethernet to Ethernet 01 2025-04-18 09:39:40 -04:00
Kyle Schwarz 8b680f2b64 All: Update network names
Updates all network names, the new format is <id>_<%02d>.
2025-04-17 20:57:46 +00:00
Kyle Schwarz e88cd244c8 Driver: D3XX: Refactor pipe logic 2025-04-15 17:44:58 -04:00
Jonathan Schwartz 70733b3d96 Epsilon: Add PHY settings 2025-04-09 14:08:55 +00:00
Jonathan Schwartz f743f32e63 Bindings: Python: Add FlexRay
Only RX at this time.
2025-04-08 20:47:51 +00:00
vits71 739ff4d637
Merge branch 'intrepidcs:master' into Npcap-fix 2025-01-11 23:15:28 +01:00
Vít Šembera e233233b94 Fixed Npcap related errors in PCAPDLL::PCAPDLL() 2024-07-18 13:26:39 +02:00
155 changed files with 2684 additions and 20659 deletions

View File

@ -13,7 +13,7 @@ option(LIBICSNEO_BUILD_ICSNEOC "Build dynamic C library" ON)
option(LIBICSNEO_BUILD_ICSNEOC_STATIC "Build static C library" ON)
option(LIBICSNEO_BUILD_ICSNEOLEGACY "Build icsnVC40 compatibility library" ON)
option(LIBICSNEO_BUILD_ICSNEOLEGACY_STATIC "Build static icsnVC40 compatibility library" ON)
set(LIBICSNEO_NPCAP_INCLUDE_DIR "" CACHE STRING "Npcap include directory; set to build with Npcap")
set(LIBICSNEO_NPCAP_INCLUDE_DIR "C:/Users/Vit/source/repos/npcap-sdk-1.13/Include" CACHE STRING "Npcap include directory; set to build with Npcap")
# Device Drivers
# You almost certainly don't want firmio for your build,

View File

@ -121,6 +121,7 @@ static constexpr const char* UNEXPECTED_RESPONSE = "Received an unexpected or in
static constexpr const char* LIN_SETTINGS_NOT_AVAILABLE = "LIN settings are not available for this device.";
static constexpr const char* MODE_NOT_FOUND = "The mode was not found.";
static constexpr const char* GPTP_NOT_SUPPORTED = "GPTP clock synchronization is not supported on this device.";
static constexpr const char* SETTING_NOT_AVAILABLE = "Requested a setting that is not available on this device";
// Transport Errors
static constexpr const char* FAILED_TO_READ = "A read operation failed.";
@ -316,6 +317,8 @@ const char* APIEvent::DescriptionForType(Type type) {
return LIN_SETTINGS_NOT_AVAILABLE;
case Type::ModeNotFound:
return MODE_NOT_FOUND;
case Type::SettingNotAvaiableDevice:
return SETTING_NOT_AVAILABLE;
// Transport Errors
case Type::FailedToRead:
return FAILED_TO_READ;

View File

@ -29,25 +29,25 @@ static std::map<legacymaphandle_t, neodevice_t> neodevices;
static std::map<neodevice_t*, NeoDeviceEx*> openneodevices;
static const std::map<size_t, size_t> mp_netIDToVnetOffSet = {
{NETID_HSCAN, 1},
{NETID_MSCAN, 2},
{NETID_HSCAN2, 18},
{NETID_HSCAN3, 19},
{NETID_HSCAN4, 32},
{NETID_HSCAN5, 33},
{NETID_HSCAN6, 47},
{NETID_HSCAN7, 48},
{NETID_DWCAN_01, 1},
{NETID_DWCAN_08, 2},
{NETID_DWCAN_02, 18},
{NETID_DWCAN_03, 19},
{NETID_DWCAN_04, 32},
{NETID_DWCAN_05, 33},
{NETID_DWCAN_06, 47},
{NETID_DWCAN_07, 48},
};
static const std::map<size_t, size_t> mp_HWnetIDToCMnetID = {
{NETID_HSCAN, 0},
{NETID_MSCAN, 1},
{NETID_HSCAN2, 5},
{NETID_HSCAN3, 8},
{NETID_HSCAN4, 14},
{NETID_HSCAN5, 15},
{NETID_HSCAN6, 32},
{NETID_HSCAN7, 33},
{NETID_DWCAN_01, 0},
{NETID_DWCAN_08, 1},
{NETID_DWCAN_02, 5},
{NETID_DWCAN_03, 8},
{NETID_DWCAN_04, 14},
{NETID_DWCAN_05, 15},
{NETID_DWCAN_06, 32},
{NETID_DWCAN_07, 33},
};
static unsigned long vnet_table[] = {0, PLASMA_SLAVE1_OFFSET, PLASMA_SLAVE2_OFFSET};

View File

@ -35,8 +35,10 @@ pybind11_add_module(icsneopy
icsneopy/communication/message/scriptstatusmessage.cpp
icsneopy/communication/message/callback/messagecallback.cpp
icsneopy/communication/message/filter/messagefilter.cpp
icsneopy/communication/message/flexray/flexraymessage.cpp
icsneopy/disk/diskdriver.cpp
icsneopy/device/device.cpp
icsneopy/device/idevicesettings.cpp
icsneopy/icsneocpp.cpp
)
target_link_libraries(icsneopy PRIVATE icsneocpp)

View File

@ -0,0 +1,57 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/functional.h>
#include "icsneo/communication/message/flexray/flexraymessage.h"
#include "icsneo/device/extensions/flexray/symbol.h"
#include "icsneo/device/extensions/flexray/channel.h"
#include "icsneo/device/extensions/flexray/crcstatus.h"
namespace icsneo {
struct FlexRayNamespace {
using Symbol = icsneo::FlexRay::Symbol;
using CRCStatus = icsneo::FlexRay::CRCStatus;
using Channel = icsneo::FlexRay::Channel;
};
void init_flexraymessage(pybind11::module_& m) {
// dummy class to hold the enums
pybind11::class_<FlexRayNamespace> flexray(m, "FlexRay");
// enumerations
pybind11::enum_<FlexRayNamespace::Symbol>(flexray, "Symbol")
.value("None", FlexRayNamespace::Symbol::None)
.value("Unknown", FlexRayNamespace::Symbol::Unknown)
.value("Wakeup", FlexRayNamespace::Symbol::Wakeup)
.value("CAS", FlexRayNamespace::Symbol::CAS);
pybind11::enum_<FlexRayNamespace::CRCStatus>(flexray, "CRCStatus")
.value("OK", FlexRayNamespace::CRCStatus::OK)
.value("Error", FlexRayNamespace::CRCStatus::Error)
.value("NoCRC", FlexRayNamespace::CRCStatus::NoCRC);
pybind11::enum_<FlexRayNamespace::Channel>(flexray, "Channel")
.value("None", FlexRayNamespace::Channel::None)
.value("A", FlexRayNamespace::Channel::A)
.value("B", FlexRayNamespace::Channel::B)
.value("AB", FlexRayNamespace::Channel::AB);
// read-only until transmit is supported
pybind11::class_<FlexRayMessage, std::shared_ptr<FlexRayMessage>, Frame>(m, "FlexRayMessage")
.def(pybind11::init())
.def_readonly("slotid", &FlexRayMessage::slotid)
.def_readonly("tsslen", &FlexRayMessage::tsslen)
.def_readonly("framelen", &FlexRayMessage::framelen)
.def_readonly("symbol", &FlexRayMessage::symbol)
.def_readonly("header_crc_status", &FlexRayMessage::headerCRCStatus)
.def_readonly("header_crc", &FlexRayMessage::headerCRC)
.def_readonly("frame_crc_status", &FlexRayMessage::crcStatus)
.def_readonly("frame_crc", &FlexRayMessage::frameCRC)
.def_readonly("channel", &FlexRayMessage::channel)
.def_readonly("null_frame", &FlexRayMessage::nullFrame)
.def_readonly("payload_preamble", &FlexRayMessage::payloadPreamble)
.def_readonly("sync_frame", &FlexRayMessage::sync)
.def_readonly("startup_frame", &FlexRayMessage::startup)
.def_readonly("dynamic_frame", &FlexRayMessage::dynamic)
.def_readonly("cycle", &FlexRayMessage::cycle);
}
} // namespace icsneo

View File

@ -11,25 +11,25 @@ void init_network(pybind11::module_& m) {
pybind11::enum_<Network::NetID>(network, "NetID")
.value("Device", Network::NetID::Device)
.value("HSCAN", Network::NetID::HSCAN)
.value("MSCAN", Network::NetID::MSCAN)
.value("SWCAN", Network::NetID::SWCAN)
.value("LSFTCAN", Network::NetID::LSFTCAN)
.value("DWCAN_01", Network::NetID::DWCAN_01)
.value("DWCAN_08", Network::NetID::DWCAN_08)
.value("SWCAN_01", Network::NetID::SWCAN_01)
.value("LSFTCAN_01", Network::NetID::LSFTCAN_01)
.value("FordSCP", Network::NetID::FordSCP)
.value("J1708", Network::NetID::J1708)
.value("Aux", Network::NetID::Aux)
.value("J1850VPW", Network::NetID::J1850VPW)
.value("ISO9141", Network::NetID::ISO9141)
.value("ISO9141_01", Network::NetID::ISO9141_01)
.value("DiskData", Network::NetID::DiskData)
.value("Main51", Network::NetID::Main51)
.value("RED", Network::NetID::RED)
.value("SCI", Network::NetID::SCI)
.value("ISO9141_2", Network::NetID::ISO9141_2)
.value("ISO9141_02", Network::NetID::ISO9141_02)
.value("ISO14230", Network::NetID::ISO14230)
.value("LIN", Network::NetID::LIN)
.value("OP_Ethernet1", Network::NetID::OP_Ethernet1)
.value("OP_Ethernet2", Network::NetID::OP_Ethernet2)
.value("OP_Ethernet3", Network::NetID::OP_Ethernet3)
.value("LIN_01", Network::NetID::LIN_01)
.value("AE_01", Network::NetID::AE_01)
.value("AE_02", Network::NetID::AE_02)
.value("AE_03", Network::NetID::AE_03)
.value("RED_EXT_MEMORYREAD", Network::NetID::RED_EXT_MEMORYREAD)
.value("RED_INT_MEMORYREAD", Network::NetID::RED_INT_MEMORYREAD)
.value("RED_DFLASH_READ", Network::NetID::RED_DFLASH_READ)
@ -51,15 +51,15 @@ void init_network(pybind11::module_& m) {
.value("RED_SCOPE_CAPTURE", Network::NetID::RED_SCOPE_CAPTURE)
.value("RED_HARDWARE_EXCEP", Network::NetID::RED_HARDWARE_EXCEP)
.value("RED_GET_RTC", Network::NetID::RED_GET_RTC)
.value("ISO9141_3", Network::NetID::ISO9141_3)
.value("HSCAN2", Network::NetID::HSCAN2)
.value("HSCAN3", Network::NetID::HSCAN3)
.value("OP_Ethernet4", Network::NetID::OP_Ethernet4)
.value("OP_Ethernet5", Network::NetID::OP_Ethernet5)
.value("ISO9141_4", Network::NetID::ISO9141_4)
.value("LIN2", Network::NetID::LIN2)
.value("LIN3", Network::NetID::LIN3)
.value("LIN4", Network::NetID::LIN4)
.value("ISO9141_03", Network::NetID::ISO9141_03)
.value("DWCAN_02", Network::NetID::DWCAN_02)
.value("DWCAN_03", Network::NetID::DWCAN_03)
.value("AE_04", Network::NetID::AE_04)
.value("AE_05", Network::NetID::AE_05)
.value("ISO9141_04", Network::NetID::ISO9141_04)
.value("LIN_02", Network::NetID::LIN_02)
.value("LIN_03", Network::NetID::LIN_03)
.value("LIN_04", Network::NetID::LIN_04)
.value("RED_App_Error", Network::NetID::RED_App_Error)
.value("CGI", Network::NetID::CGI)
.value("Reset_Status", Network::NetID::Reset_Status)
@ -69,44 +69,44 @@ void init_network(pybind11::module_& m) {
.value("Read_Datalink_Cm_Rx_Msg", Network::NetID::Read_Datalink_Cm_Rx_Msg)
.value("Logging_Overflow", Network::NetID::Logging_Overflow)
.value("ReadSettings", Network::NetID::ReadSettings)
.value("HSCAN4", Network::NetID::HSCAN4)
.value("HSCAN5", Network::NetID::HSCAN5)
.value("DWCAN_04", Network::NetID::DWCAN_04)
.value("DWCAN_05", Network::NetID::DWCAN_05)
.value("RS232", Network::NetID::RS232)
.value("UART", Network::NetID::UART)
.value("UART2", Network::NetID::UART2)
.value("UART3", Network::NetID::UART3)
.value("UART4", Network::NetID::UART4)
.value("SWCAN2", Network::NetID::SWCAN2)
.value("Ethernet_DAQ", Network::NetID::Ethernet_DAQ)
.value("UART_01", Network::NetID::UART_01)
.value("UART_02", Network::NetID::UART_02)
.value("UART_03", Network::NetID::UART_03)
.value("UART_04", Network::NetID::UART_04)
.value("SWCAN_02", Network::NetID::SWCAN_02)
.value("ETHERNET_DAQ", Network::NetID::ETHERNET_DAQ)
.value("Data_To_Host", Network::NetID::Data_To_Host)
.value("TextAPI_To_Host", Network::NetID::TextAPI_To_Host)
.value("SPI1", Network::NetID::SPI1)
.value("OP_Ethernet6", Network::NetID::OP_Ethernet6)
.value("SPI_01", Network::NetID::SPI_01)
.value("AE_06", Network::NetID::AE_06)
.value("Red_VBat", Network::NetID::Red_VBat)
.value("OP_Ethernet7", Network::NetID::OP_Ethernet7)
.value("OP_Ethernet8", Network::NetID::OP_Ethernet8)
.value("OP_Ethernet9", Network::NetID::OP_Ethernet9)
.value("OP_Ethernet10", Network::NetID::OP_Ethernet10)
.value("OP_Ethernet11", Network::NetID::OP_Ethernet11)
.value("FlexRay1a", Network::NetID::FlexRay1a)
.value("FlexRay1b", Network::NetID::FlexRay1b)
.value("FlexRay2a", Network::NetID::FlexRay2a)
.value("FlexRay2b", Network::NetID::FlexRay2b)
.value("LIN5", Network::NetID::LIN5)
.value("FlexRay", Network::NetID::FlexRay)
.value("FlexRay2", Network::NetID::FlexRay2)
.value("OP_Ethernet12", Network::NetID::OP_Ethernet12)
.value("I2C", Network::NetID::I2C)
.value("MOST25", Network::NetID::MOST25)
.value("MOST50", Network::NetID::MOST50)
.value("MOST150", Network::NetID::MOST150)
.value("Ethernet", Network::NetID::Ethernet)
.value("AE_07", Network::NetID::AE_07)
.value("AE_08", Network::NetID::AE_08)
.value("AE_09", Network::NetID::AE_09)
.value("AE_10", Network::NetID::AE_10)
.value("AE_11", Network::NetID::AE_11)
.value("FLEXRAY_01A", Network::NetID::FLEXRAY_01A)
.value("FLEXRAY_01B", Network::NetID::FLEXRAY_01B)
.value("FLEXRAY_02A", Network::NetID::FLEXRAY_02A)
.value("FLEXRAY_02B", Network::NetID::FLEXRAY_02B)
.value("LIN_05", Network::NetID::LIN_05)
.value("FLEXRAY_01", Network::NetID::FLEXRAY_01)
.value("FLEXRAY_02", Network::NetID::FLEXRAY_02)
.value("AE_12", Network::NetID::AE_12)
.value("I2C_01", Network::NetID::I2C_01)
.value("MOST_25", Network::NetID::MOST_25)
.value("MOST_50", Network::NetID::MOST_50)
.value("MOST_150", Network::NetID::MOST_150)
.value("ETHERNET_01", Network::NetID::ETHERNET_01)
.value("GMFSA", Network::NetID::GMFSA)
.value("TCP", Network::NetID::TCP)
.value("HSCAN6", Network::NetID::HSCAN6)
.value("HSCAN7", Network::NetID::HSCAN7)
.value("LIN6", Network::NetID::LIN6)
.value("LSFTCAN2", Network::NetID::LSFTCAN2)
.value("DWCAN_06", Network::NetID::DWCAN_06)
.value("DWCAN_07", Network::NetID::DWCAN_07)
.value("LIN_06", Network::NetID::LIN_06)
.value("LSFTCAN_02", Network::NetID::LSFTCAN_02)
.value("LogicalDiskInfo", Network::NetID::LogicalDiskInfo)
.value("WiVICommand", Network::NetID::WiVICommand)
.value("ScriptStatus", Network::NetID::ScriptStatus)
@ -119,51 +119,51 @@ void init_network(pybind11::module_& m) {
.value("DeviceStatus", Network::NetID::DeviceStatus)
.value("UDP", Network::NetID::UDP)
.value("ForwardedMessage", Network::NetID::ForwardedMessage)
.value("I2C2", Network::NetID::I2C2)
.value("I2C3", Network::NetID::I2C3)
.value("I2C4", Network::NetID::I2C4)
.value("Ethernet2", Network::NetID::Ethernet2)
.value("A2B1", Network::NetID::A2B1)
.value("A2B2", Network::NetID::A2B2)
.value("Ethernet3", Network::NetID::Ethernet3)
.value("WBMS", Network::NetID::WBMS)
.value("DWCAN9", Network::NetID::DWCAN9)
.value("DWCAN10", Network::NetID::DWCAN10)
.value("DWCAN11", Network::NetID::DWCAN11)
.value("DWCAN12", Network::NetID::DWCAN12)
.value("DWCAN13", Network::NetID::DWCAN13)
.value("DWCAN14", Network::NetID::DWCAN14)
.value("DWCAN15", Network::NetID::DWCAN15)
.value("DWCAN16", Network::NetID::DWCAN16)
.value("LIN7", Network::NetID::LIN7)
.value("LIN8", Network::NetID::LIN8)
.value("SPI2", Network::NetID::SPI2)
.value("MDIO1", Network::NetID::MDIO1)
.value("MDIO2", Network::NetID::MDIO2)
.value("MDIO3", Network::NetID::MDIO3)
.value("MDIO4", Network::NetID::MDIO4)
.value("MDIO5", Network::NetID::MDIO5)
.value("MDIO6", Network::NetID::MDIO6)
.value("MDIO7", Network::NetID::MDIO7)
.value("MDIO8", Network::NetID::MDIO8)
.value("OP_Ethernet13", Network::NetID::OP_Ethernet13)
.value("OP_Ethernet14", Network::NetID::OP_Ethernet14)
.value("OP_Ethernet15", Network::NetID::OP_Ethernet15)
.value("OP_Ethernet16", Network::NetID::OP_Ethernet16)
.value("SPI3", Network::NetID::SPI3)
.value("SPI4", Network::NetID::SPI4)
.value("SPI5", Network::NetID::SPI5)
.value("SPI6", Network::NetID::SPI6)
.value("SPI7", Network::NetID::SPI7)
.value("SPI8", Network::NetID::SPI8)
.value("LIN9", Network::NetID::LIN9)
.value("LIN10", Network::NetID::LIN10)
.value("LIN11", Network::NetID::LIN11)
.value("LIN12", Network::NetID::LIN12)
.value("LIN13", Network::NetID::LIN13)
.value("LIN14", Network::NetID::LIN14)
.value("LIN15", Network::NetID::LIN15)
.value("LIN16", Network::NetID::LIN16)
.value("I2C_02", Network::NetID::I2C_02)
.value("I2C_03", Network::NetID::I2C_03)
.value("I2C_04", Network::NetID::I2C_04)
.value("ETHERNET_02", Network::NetID::ETHERNET_02)
.value("A2B_01", Network::NetID::A2B_01)
.value("A2B_02", Network::NetID::A2B_02)
.value("ETHERNET_03", Network::NetID::ETHERNET_03)
.value("WBMS_01", Network::NetID::WBMS_01)
.value("DWCAN_09", Network::NetID::DWCAN_09)
.value("DWCAN_10", Network::NetID::DWCAN_10)
.value("DWCAN_11", Network::NetID::DWCAN_11)
.value("DWCAN_12", Network::NetID::DWCAN_12)
.value("DWCAN_13", Network::NetID::DWCAN_13)
.value("DWCAN_14", Network::NetID::DWCAN_14)
.value("DWCAN_15", Network::NetID::DWCAN_15)
.value("DWCAN_16", Network::NetID::DWCAN_16)
.value("LIN_07", Network::NetID::LIN_07)
.value("LIN_08", Network::NetID::LIN_08)
.value("SPI_02", Network::NetID::SPI_02)
.value("MDIO_01", Network::NetID::MDIO_01)
.value("MDIO_02", Network::NetID::MDIO_02)
.value("MDIO_03", Network::NetID::MDIO_03)
.value("MDIO_04", Network::NetID::MDIO_04)
.value("MDIO_05", Network::NetID::MDIO_05)
.value("MDIO_06", Network::NetID::MDIO_06)
.value("MDIO_07", Network::NetID::MDIO_07)
.value("MDIO_08", Network::NetID::MDIO_08)
.value("AE_13", Network::NetID::AE_13)
.value("AE_14", Network::NetID::AE_14)
.value("AE_15", Network::NetID::AE_15)
.value("AE_16", Network::NetID::AE_16)
.value("SPI_03", Network::NetID::SPI_03)
.value("SPI_04", Network::NetID::SPI_04)
.value("SPI_05", Network::NetID::SPI_05)
.value("SPI_06", Network::NetID::SPI_06)
.value("SPI_07", Network::NetID::SPI_07)
.value("SPI_08", Network::NetID::SPI_08)
.value("LIN_09", Network::NetID::LIN_09)
.value("LIN_10", Network::NetID::LIN_10)
.value("LIN_11", Network::NetID::LIN_11)
.value("LIN_12", Network::NetID::LIN_12)
.value("LIN_13", Network::NetID::LIN_13)
.value("LIN_14", Network::NetID::LIN_14)
.value("LIN_15", Network::NetID::LIN_15)
.value("LIN_16", Network::NetID::LIN_16)
.value("Any", Network::NetID::Any)
.value("Invalid", Network::NetID::Invalid);
@ -178,7 +178,7 @@ void init_network(pybind11::module_& m) {
.value("LSFTCAN", Network::Type::LSFTCAN)
.value("SWCAN", Network::Type::SWCAN)
.value("ISO9141", Network::Type::ISO9141)
.value("I2C", Network::Type::I2C)
.value("I2C_01", Network::Type::I2C)
.value("A2B", Network::Type::A2B)
.value("SPI", Network::Type::SPI)
.value("MDIO", Network::Type::MDIO)

View File

@ -51,7 +51,8 @@ void init_device(pybind11::module_& m) {
.def("supports_tc10", &Device::supportsTC10)
.def("transmit", pybind11::overload_cast<std::shared_ptr<Frame>>(&Device::transmit), pybind11::call_guard<pybind11::gil_scoped_release>())
.def("upload_coremini", [](Device& device, std::string& path, Disk::MemoryType memType) { std::ifstream ifs(path, std::ios::binary); return device.uploadCoremini(ifs, memType); }, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("write_macsec_config", &Device::writeMACsecConfig, pybind11::call_guard<pybind11::gil_scoped_release>());
.def("write_macsec_config", &Device::writeMACsecConfig, pybind11::call_guard<pybind11::gil_scoped_release>())
.def_readonly("settings", &Device::settings);
}
} // namespace icsneo

View File

@ -0,0 +1,47 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
#include <pybind11/functional.h>
#include <pybind11/chrono.h>
#include "icsneo/device/idevicesettings.h"
#include <fstream>
namespace icsneo {
struct DeviceSettingsNamespace {
using EthLinkMode = AELinkMode;
using LinkSpeed = EthLinkSpeed;
};
void init_idevicesettings(pybind11::module_& m) {
pybind11::class_<DeviceSettingsNamespace> settings(m, "Settings");
pybind11::enum_<DeviceSettingsNamespace::EthLinkMode>(settings, "EthernetLinkMode")
.value("Auto", DeviceSettingsNamespace::EthLinkMode::AE_LINK_AUTO)
.value("Slave", DeviceSettingsNamespace::EthLinkMode::AE_LINK_SLAVE)
.value("Master", DeviceSettingsNamespace::EthLinkMode::AE_LINK_MASTER);
pybind11::enum_<DeviceSettingsNamespace::LinkSpeed>(settings, "EthernetLinkSpeed")
.value("Speed10M", DeviceSettingsNamespace::LinkSpeed::ETH_SPEED_10)
.value("Speed100M", DeviceSettingsNamespace::LinkSpeed::ETH_SPEED_100)
.value("Speed1G", DeviceSettingsNamespace::LinkSpeed::ETH_SPEED_1000)
.value("Speed2_5G", DeviceSettingsNamespace::LinkSpeed::ETH_SPEED_2500)
.value("Speed5G", DeviceSettingsNamespace::LinkSpeed::ETH_SPEED_5000)
.value("Speed10G", DeviceSettingsNamespace::LinkSpeed::ETH_SPEED_10000);
pybind11::class_<IDeviceSettings, std::shared_ptr<IDeviceSettings>>(m, "IDeviceSettings")
.def("apply", &IDeviceSettings::apply, pybind11::arg("temporary") = 0, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("apply_defaults", &IDeviceSettings::applyDefaults, pybind11::arg("temporary") = 0, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("get_phy_enable", &IDeviceSettings::getPhyEnable, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("get_phy_mode", &IDeviceSettings::getPhyMode, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("get_phy_speed", &IDeviceSettings::getPhySpeed, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("set_phy_enable", &IDeviceSettings::setPhyEnable, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("set_phy_mode", &IDeviceSettings::setPhyMode, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("set_phy_speed", &IDeviceSettings::setPhySpeed, pybind11::call_guard<pybind11::gil_scoped_release>())
.def("refresh", &IDeviceSettings::refresh, pybind11::arg("ignoreChecksum") = 0, pybind11::call_guard<pybind11::gil_scoped_release>());
}
} // namespace icsneo

View File

@ -28,6 +28,8 @@ void init_device(pybind11::module_&);
void init_messagefilter(pybind11::module_&);
void init_messagecallback(pybind11::module_&);
void init_version(pybind11::module_&);
void init_flexraymessage(pybind11::module_& m);
void init_idevicesettings(pybind11::module_&);
PYBIND11_MODULE(icsneopy, m) {
pybind11::options options;
@ -56,6 +58,8 @@ PYBIND11_MODULE(icsneopy, m) {
init_messagecallback(m);
init_diskdriver(m);
init_device(m);
init_flexraymessage(m);
init_idevicesettings(m);
m.def("find_all_devices", &FindAllDevices);
m.def("get_supported_devices", &GetSupportedDevices);

View File

@ -14,10 +14,10 @@ enum LinkSpeed {
};
enum LinkMode {
OPETH_LINK_AUTO,
OPETH_LINK_MASTER,
OPETH_LINK_SLAVE,
OPETH_LINK_INVALID = 255,
AE_LINK_AUTO,
AE_LINK_MASTER,
AE_LINK_SLAVE,
AE_LINK_INVALID = 255,
};
struct Packet {
@ -47,10 +47,10 @@ std::shared_ptr<Message> EthernetStatusMessage::DecodeToMessage(const std::vecto
}
LinkMode mode;
switch(packet->mode) {
case OPETH_LINK_INVALID: mode = EthernetStatusMessage::LinkMode::LinkModeInvalid; break;
case OPETH_LINK_AUTO: mode = EthernetStatusMessage::LinkMode::LinkModeAuto; break;
case OPETH_LINK_MASTER: mode = EthernetStatusMessage::LinkMode::LinkModeMaster; break;
case OPETH_LINK_SLAVE: mode = EthernetStatusMessage::LinkMode::LinkModeSlave; break;
case AE_LINK_INVALID: mode = EthernetStatusMessage::LinkMode::LinkModeInvalid; break;
case AE_LINK_AUTO: mode = EthernetStatusMessage::LinkMode::LinkModeAuto; break;
case AE_LINK_MASTER: mode = EthernetStatusMessage::LinkMode::LinkModeMaster; break;
case AE_LINK_SLAVE: mode = EthernetStatusMessage::LinkMode::LinkModeSlave; break;
default: return nullptr;
}
return std::make_shared<EthernetStatusMessage>(packet->network, packet->state, speed, packet->duplex, mode);

View File

@ -31,7 +31,7 @@ std::shared_ptr<ComponentVersionsMessage> ComponentVersionPacket::DecodeToMessag
// Get a reference to the payload to fully validate the length
const auto& response = *reinterpret_cast<const ComponentVersionsResponse*>(bytes.data());
// Expected size is the header, numVersions field, and numVersions ComponentVersion objects.
auto expectedSize = sizeof(ExtendedResponseMessage::ResponseHeader) + 2 + (response.numVersions * sizeof(ComponentVersion));
auto expectedSize = sizeof(ExtendedResponseMessage::ResponseHeader) + 2 + (response.numVersions * sizeof(PackedComponentVersion));
// If the response is malformed (too small), return an empty message.
if(bytes.size() < expectedSize) {
return msg; // Empty
@ -39,7 +39,14 @@ std::shared_ptr<ComponentVersionsMessage> ComponentVersionPacket::DecodeToMessag
// Unpack into the portable class
for(unsigned int i = 0; i < response.numVersions; ++i) {
const auto& packedVersion = response.versions[i];
msg->versions.emplace_back(packedVersion.valid, packedVersion.componentInfo, packedVersion.identifier, packedVersion.dotVersion, packedVersion.commitHash);
msg->versions.emplace_back(
packedVersion.valid,
packedVersion.componentInfo,
packedVersion.identifier,
packedVersion.dotVersion,
packedVersion.commitHash,
packedVersion.expansionSlot
);
}
return msg;
}

View File

@ -134,6 +134,18 @@ std::pair<std::vector<std::shared_ptr<Message>>, bool> Device::getMessages() {
return std::make_pair(ret, retBool);
}
std::shared_ptr<DeviceExtension> Device::getExtension(const std::string& name) const {
std::shared_ptr<DeviceExtension> ret;
std::lock_guard<std::mutex> lk(extensionsLock);
for(auto& ext : extensions) {
if((ext->getName() == name)) {
ret = ext;
break;
}
}
return ret;
}
bool Device::getMessages(std::vector<std::shared_ptr<Message>>& container, size_t limit, std::chrono::milliseconds timeout) {
if(!isOpen()) {
report(APIEvent::Type::DeviceCurrentlyClosed, APIEvent::Severity::Error);
@ -180,6 +192,14 @@ void Device::enforcePollingMessageLimit() {
}
}
bool Device::refreshComponentVersions() {
if(auto compVersions = com->getComponentVersionsSync()) {
componentVersions = std::move(*compVersions);
return true;
}
return false;
}
bool Device::open(OpenFlags flags, OpenStatusHandler handler) {
if(!com) {
report(APIEvent::Type::Unknown, APIEvent::Severity::Error);
@ -199,6 +219,7 @@ bool Device::open(OpenFlags flags, OpenStatusHandler handler) {
tryAgain = true;
return true;
});
if(!tryAgain) {
com->close();
report(attemptErr, APIEvent::Severity::Error);
@ -222,15 +243,7 @@ bool Device::open(OpenFlags flags, OpenStatusHandler handler) {
if(block) // Extensions say no
return false;
// Get component versions again *after* the extension "onDeviceOpen" hooks (e.g. device reflashes)
if(supportsComponentVersions()) {
if(auto compVersions = com->getComponentVersionsSync())
componentVersions = std::move(*compVersions);
else
// It's possible the device is on older firmware so don't return false here
report(APIEvent::Type::NoDeviceResponse, APIEvent::Severity::EventWarning);
}
refreshComponentVersions();
if(!settings->disabled) {
// Since we will not fail the open if a settings read fails,
// downgrade any errors to warnings. Otherwise the error will
@ -336,13 +349,14 @@ APIEvent::Type Device::attemptToBeginCommunication() {
return getCommunicationNotEstablishedError();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
auto serial = com->getSerialNumberSync();
auto serial = com->getSerialNumberSync(std::chrono::milliseconds(200));
int i = 0;
while(!serial) {
serial = com->getSerialNumberSync();
serial = com->getSerialNumberSync(std::chrono::milliseconds(200));
if(i++ > 5)
break;
}
if(!serial) // "Communication could not be established with the device. Perhaps it is not powered with 12 volts?"
return getCommunicationNotEstablishedError();
@ -356,7 +370,6 @@ APIEvent::Type Device::attemptToBeginCommunication() {
else
versions = std::move(*maybeVersions);
// Get component versions before the extension "onDeviceOpen" hooks so that we can properly check verisons
if(supportsComponentVersions()) {
if(auto compVersions = com->getComponentVersionsSync())

View File

@ -2,7 +2,7 @@
Python Examples
===============
Transmit CAN frames on HSCAN
Transmit CAN frames on DW CAN 01
============================
.. code-block:: python
@ -15,7 +15,7 @@ Transmit CAN frames on HSCAN
device: icsneopy.Device = devices[0]
message = icsneopy.CANMessage()
message.network = icsneopy.Network(icsneopy.Network.NetID.HSCAN)
message.network = icsneopy.Network(icsneopy.Network.NetID.DWCAN_01)
message.arbid = 0x56
message.data = (0x11, 0x22, 0x33)
@ -25,7 +25,7 @@ Transmit CAN frames on HSCAN
device.transmit(message)
Receive CAN frames on HSCAN
Receive CAN frames on DW CAN 01
===========================
.. code-block:: python
@ -40,7 +40,7 @@ Receive CAN frames on HSCAN
def on_message(message: icsneopy.CANMessage):
print(message.arbid, message.data)
message_filter = icsneopy.MessageFilter(icsneopy.Network.NetID.HSCAN)
message_filter = icsneopy.MessageFilter(icsneopy.Network.NetID.DWCAN_01)
callback = icsneopy.MessageCallback(on_message, message_filter)
device.add_message_callback(callback)
@ -105,7 +105,7 @@ TC10
device.open()
netid = icsneopy.Network.NetID.OP_Ethernet1
netid = icsneopy.Network.NetID.AE_01
if device.supports_tc10():
# initial

View File

@ -7,3 +7,4 @@ icsneopy
examples
api
radepsilon

View File

@ -0,0 +1,137 @@
=======================================
Python Examples for RAD-Epsilon Devices
=======================================
Working with PHY Settings
=========================
.. code-block:: python
import sys
import icsneopy
class PhyStaticInfo:
def __init__(self, index, type, switch_port):
self.index = index
self.type = type
self.switch_port = switch_port
def __repr__(self):
return f"{self.switch_port}: Type {self.type} / Index {self.index}"
# Switch Port name to PHY index and PHY type
RAD_EPSILON_PHY_INFO = {
"1": PhyStaticInfo(0, "88Q2112", "1"),
"2": PhyStaticInfo(1, "88Q2112", "2"),
"3": PhyStaticInfo(2, "88Q2112", "3"),
"4": PhyStaticInfo(3, "88Q2112", "4"),
"5": PhyStaticInfo(4, "88Q2112", "5"),
"6": PhyStaticInfo(5, "88Q2112", "6"),
"9": PhyStaticInfo(6, "88Q2112", "9"),
"10": PhyStaticInfo(7, "88Q2112", "10")
}
RAD_EPSILON_XL_PHY_INFO = {
"A1": PhyStaticInfo(0, "88Q222x", "A1"),
"A2": PhyStaticInfo(1, "88Q222x", "A2"),
"A3": PhyStaticInfo(2, "88Q222x", "A3"),
"A4": PhyStaticInfo(3, "88Q222x", "A4"),
"A5": PhyStaticInfo(4, "88Q222x", "A5"),
"A6": PhyStaticInfo(5, "88Q222x", "A6"),
"A11": PhyStaticInfo(6, "88Q222x", "A11"),
"A8": PhyStaticInfo(7, "88Q222x", "A8"),
"B1": PhyStaticInfo(8, "88Q222x", "B1"),
"B2": PhyStaticInfo(9, "88Q222x", "B2"),
"B3": PhyStaticInfo(10, "88Q222x", "B3"),
"B4": PhyStaticInfo(11, "88Q222x", "B4"),
"B5": PhyStaticInfo(12, "88Q222x", "B5"),
"B6": PhyStaticInfo(13, "88Q222x", "B6"),
"B7": PhyStaticInfo(14, "88Q222x", "B7"),
"B8": PhyStaticInfo(15, "88Q222x", "B8"),
"A9": PhyStaticInfo(16, "88X3310", "A9"),
"B9": PhyStaticInfo(17, "88X3310", "B9"),
}
def find_specific_device(type: icsneopy.DeviceType.Enum, serial: str | None = None) -> icsneopy.Device | None:
devices = icsneopy.find_all_devices()
for device in devices:
device_type = device.get_type().get_device_type()
if serial: # always find by serial if specified
if device.get_serial() == serial:
return device
elif device_type == type:
return device
return None
def find_rad_epsilonxl(serial: str | None = None) -> icsneopy.Device | None:
return find_specific_device(icsneopy.DeviceType.Enum.RADEpsilonXL, serial)
def find_rad_epsilon(serial: str | None = None) -> icsneopy.Device | None:
return find_specific_device(icsneopy.DeviceType.Enum.RADEpsilon, serial)
def report_phy_settings(device: icsneopy.Device, phy: PhyStaticInfo) -> bool:
phy_enable = device.settings.get_phy_enable(phy.index)
phy_mode = device.settings.get_phy_mode(phy.index)
phy_speed = device.settings.get_phy_speed(phy.index)
if phy_enable is None or phy_mode is None or phy_speed is None:
print(f"failed to get settings for PHY{phy.index} on port {phy.switch_port}")
print(f"PHY {phy.index} ({phy.type})")
print(f"\tPort: {phy.switch_port}")
print(f"\tEnabled: {'TRUE' if phy_enable else 'FALSE'}")
print(f"\tMode: {phy_mode}")
print(f"\tSpeed: {phy_speed}")
return True
def configure_phy(device: icsneopy.Device, phy: PhyStaticInfo, enable: bool, mode: int, speed: int) -> bool:
if not device.settings.set_phy_enable(phy.index, enable):
print(f"failed to set enable for PHY{phy.index} at port {phy.switch_port}")
return False
if not device.settings.set_phy_mode(phy.index, mode):
print(f"failed to set mode for PHY{phy.index} at port {phy.switch_port}")
return False
if not device.settings.set_phy_speed(phy.index, speed):
print(f"failed to set speed for PHY{phy.index} at port {phy.switch_port}")
return False
if not device.settings.apply(True):
print(f"failed to apply settings")
print(icsneopy.get_last_error())
return False
print(f"Successfully set settings for PHY{phy.index} at port {phy.switch_port}")
return True
# find the first RAD-EpsilonXL
device = find_rad_epsilonxl()
if not device:
print("failed to find a RAD-EpsilonXL to open")
sys.exit(-1)
if not device.open():
print(f"Failed to open {device.describe()}")
print(icsneopy.get_last_error())
sys.exit(-1)
print(f"Opened {device.describe()}")
print("Applying default settings")
if not device.settings.apply_defaults():
print(icsneopy.get_last_error())
sys.exit(-1)
print("Reporting PHY settings")
for phy in RAD_EPSILON_XL_PHY_INFO.values():
report_phy_settings(device, phy)
# Setting Port A1 to Master mode, enabled, 1G speed
phy = RAD_EPSILON_XL_PHY_INFO["A1"]
if configure_phy(device, phy, True, icsneopy.Settings.EthernetLinkMode.Master, icsneopy.Settings.EthernetLinkSpeed.Speed1G) and device.settings.refresh(True):
report_phy_settings(device, phy) # report them back
else:
print(icsneopy.get_last_error())
sys.exit(-1)
device.close()

View File

@ -11,10 +11,6 @@ option(LIBICSNEO_BUILD_CPP_MDIO_EXAMPLE "Build the MDIO example." ON)
option(LIBICSNEO_BUILD_CPP_VSA_EXAMPLE "Build the VSA example." ON)
option(LIBICSNEO_BUILD_CPP_APP_ERROR_EXAMPLE "Build the app error example." ON)
# Disabled until we properly build these in-tree
# option(LIBICSNEO_BUILD_CSHARP_INTERACTIVE_EXAMPLE "Build the command-line interactive C# example." OFF)
# option(LIBICSNEO_BUILD_JAVA_INTERACTIVE_EXAMPLE "Build the command-line interactive Java example." OFF)
if(LIBICSNEO_BUILD_C_INTERACTIVE_EXAMPLE)
add_subdirectory(c/interactive)
endif()
@ -62,11 +58,3 @@ endif()
if(LIBICSNEO_BUILD_CPP_APP_ERROR_EXAMPLE)
add_subdirectory(cpp/apperror)
endif()
# if(LIBICSNEO_BUILD_CSHARP_INTERACTIVE_EXAMPLE)
# add_subdirectory(csharp)
# endif()
# if(LIBICSNEO_BUILD_JAVA_INTERACTIVE_EXAMPLE)
# add_subdirectory(java)
# endif()

View File

@ -495,10 +495,10 @@ int main() {
size_t dataLen = (frameLen > 2) ? (frameLen - 2) : 0;
size_t numberBytesHeader = (dataLen > 1) ? 3 : 1;
size_t numberBytesData = frameLen - numberBytesHeader;
if(linMsg->netid == ICSNEO_NETID_LIN) {
if(linMsg->netid == ICSNEO_NETID_LIN_01) {
printf("LIN 1 | ID: 0x%02x [%zu] ", linMsg->header[0], dataLen);
}
else if (linMsg->netid == ICSNEO_NETID_LIN2) {
else if (linMsg->netid == ICSNEO_NETID_LIN_02) {
printf("LIN 2 | ID: 0x%02x [%zu] ", linMsg->header[0], dataLen);
}
@ -562,7 +562,7 @@ int main() {
neomessage_can_t msg = {0};
msg.arbid = 0x120;
msg.length = 6;
msg.netid = ICSNEO_NETID_HSCAN;
msg.netid = ICSNEO_NETID_DWCAN_01;
msg.data = sendMessageData;
msg.description = 0x1c5; // Random description to match the receipt
msg.status.canfdFDF = false;
@ -606,7 +606,7 @@ int main() {
icsneo_describeDevice(selectedDevice, productDescription, &descriptionLength);
// Attempt to set baudrate and apply settings
if(icsneo_setBaudrate(selectedDevice, ICSNEO_NETID_HSCAN, 250000) && icsneo_settingsApply(selectedDevice)) {
if(icsneo_setBaudrate(selectedDevice, ICSNEO_NETID_DWCAN_01, 250000) && icsneo_settingsApply(selectedDevice)) {
printf("Successfully set HS CAN baudrate for %s to 250k!\n\n", productDescription);
} else {
printf("Failed to set HS CAN for %s to 250k!\n\n", productDescription);
@ -632,7 +632,7 @@ int main() {
icsneo_describeDevice(selectedDevice, productDescription, &descriptionLength);
// Attempt to set baudrate and apply settings
if(icsneo_setBaudrate(selectedDevice, ICSNEO_NETID_HSCAN, 500000) && icsneo_settingsApply(selectedDevice)) {
if(icsneo_setBaudrate(selectedDevice, ICSNEO_NETID_DWCAN_01, 500000) && icsneo_settingsApply(selectedDevice)) {
printf("Successfully set HS CAN baudrate for %s to 500k!\n\n", productDescription);
} else {
printf("Failed to set HS CAN for %s to 500k!\n\n", productDescription);
@ -758,7 +758,7 @@ int main() {
icsneo_describeDevice(selectedDevice, productDescription, &descriptionLength);
printf("Termination is ");
const bool val = icsneo_isTerminationEnabledFor(selectedDevice, ICSNEO_NETID_HSCAN);
const bool val = icsneo_isTerminationEnabledFor(selectedDevice, ICSNEO_NETID_DWCAN_01);
neoevent_t err = { 0 };
if(icsneo_getLastError(&err)) {
printf("not available at this time: %s\n\n", err.description);
@ -776,7 +776,7 @@ int main() {
}
// Attempt to set baudrate and apply settings
if(icsneo_setTerminationFor(selectedDevice, ICSNEO_NETID_HSCAN, selection2 == '1') && icsneo_settingsApply(selectedDevice)) {
if(icsneo_setTerminationFor(selectedDevice, ICSNEO_NETID_DWCAN_01, selection2 == '1') && icsneo_settingsApply(selectedDevice)) {
printf("Successfully set HS CAN termination for %s!\n\n", productDescription);
} else {
printf("Failed to set HS CAN termination for %s!\n\n", productDescription);

View File

@ -58,7 +58,7 @@ int main() {
msg1.Protocol = SPY_PROTOCOL_LIN;
msg1.StatusBitField = 0;
msg1.StatusBitField2 = 0;
lNetworkID = NETID_LIN2;
lNetworkID = NETID_LIN_02;
msg1.Header[0] = 0x11; //protected ID
msg1.Header[1] = 0xaa;
msg1.Header[2] = 0xbb;
@ -80,7 +80,7 @@ int main() {
icsSpyMessageJ1850 msg2 = {0};
msg2.Protocol = SPY_PROTOCOL_LIN;
msg2.StatusBitField = SPY_STATUS_INIT_MESSAGE;
lNetworkID = NETID_LIN;
lNetworkID = NETID_LIN_01;
msg2.Header[0] = 0x11; //protected ID
msg2.NumberBytesData = 0;
msg2.NumberBytesHeader = 1;
@ -96,7 +96,7 @@ int main() {
msg3.Protocol = SPY_PROTOCOL_LIN;
msg3.StatusBitField = SPY_STATUS_INIT_MESSAGE;
msg3.StatusBitField2 = 0;
lNetworkID = NETID_LIN;
lNetworkID = NETID_LIN_01;
msg3.Header[0] = 0xe2; //protected ID
msg3.Header[1] = 0x44;
msg3.Header[2] = 0x33;
@ -131,10 +131,10 @@ int main() {
const icsSpyMessageJ1850* linMsg = (icsSpyMessageJ1850*)&rxMsg[idx];
size_t frameLen = (linMsg->NumberBytesHeader + linMsg->NumberBytesData);
size_t dataLen = (frameLen > 2) ? (frameLen - 2) : 0;
if(linMsg->NetworkID == NETID_LIN) {
if(linMsg->NetworkID == NETID_LIN_01) {
printf("LIN 1 | ID: 0x%02x [%zu] ", linMsg->Header[0], dataLen);
}
else if (linMsg->NetworkID == NETID_LIN2) {
else if (linMsg->NetworkID == NETID_LIN_02) {
printf("LIN 2 | ID: 0x%02x [%zu] ", linMsg->Header[0], dataLen);
}

View File

@ -285,7 +285,7 @@ int main() {
msg.header[1] = 0x11;
msg.header[2] = 0x22;
msg.length = 10;
msg.netid = ICSNEO_NETID_LIN;
msg.netid = ICSNEO_NETID_LIN_01;
msg.data = sendMessageData;
msg.linStatus.txCommander = 1;
msg.linStatus.txChecksumEnhanced = 1;
@ -347,10 +347,10 @@ int main() {
neomessage_lin_t* linMsg = (neomessage_lin_t*)frame;
size_t frameLen = linMsg->length;
size_t dataLen = (frameLen > 2) ? (frameLen - 2) : 0;
if(linMsg->netid == ICSNEO_NETID_LIN) {
if(linMsg->netid == ICSNEO_NETID_LIN_01) {
printf("LIN 1 | ID: 0x%02x [%zu] ", linMsg->header[0], dataLen);
}
else if (linMsg->netid == ICSNEO_NETID_LIN2) {
else if (linMsg->netid == ICSNEO_NETID_LIN_02) {
printf("LIN 2 | ID: 0x%02x [%zu] ", linMsg->header[0], dataLen);
}

View File

@ -79,7 +79,7 @@ void example0(const std::shared_ptr<icsneo::Device>& rada2b) {
true /* true if we want 16 bit channels in the message, false for 32 bit. This should match the RAD-A2B device setting */
);
msg->txmsg = true;
msg->network = icsneo::Network(icsneo::Network::NetID::A2B2);
msg->network = icsneo::Network(icsneo::Network::NetID::A2B_02);
// Load the WAV audio data into the desired channel, break if we fail to load
if(!msg->loadAudioBuffer(wavStream, channelMap)) {
@ -192,7 +192,7 @@ void example3(const std::shared_ptr<icsneo::Device>& rada2b) {
std::shared_ptr<icsneo::A2BMessage> a2bmsgPtr = std::make_shared<icsneo::A2BMessage>(numFrames, icsneo::A2BMessage::TDMMode::TDM4, true);
icsneo::A2BMessage& a2bmsg = *a2bmsgPtr.get();
a2bmsg.network = icsneo::Network(icsneo::Network::NetID::A2B2);
a2bmsg.network = icsneo::Network(icsneo::Network::NetID::A2B_02);
a2bmsg.txmsg = true;
for(size_t frame = 0; frame < a2bmsg.getNumFrames(); frame++) {
@ -241,13 +241,13 @@ void example3(const std::shared_ptr<icsneo::Device>& rada2b) {
}
/**
* Example 4: Retrieving A2B bus status using I2C messaages.
* Example 4: Retrieving A2B bus status using I2C messages.
*/
void example4(const std::shared_ptr<icsneo::Device>& rada2b) {
std::shared_ptr<icsneo::I2CMessage> msg = std::make_shared<icsneo::I2CMessage>();
std::shared_ptr<icsneo::MessageFilter> msgFilter = std::make_shared<icsneo::MessageFilter>(icsneo::Network::NetID::I2C2);
std::shared_ptr<icsneo::MessageFilter> msgFilter = std::make_shared<icsneo::MessageFilter>(icsneo::Network::NetID::I2C_02);
msg->network = icsneo::Network(icsneo::Network::NetID::I2C2);
msg->network = icsneo::Network(icsneo::Network::NetID::I2C_02);
msg->controlBytes.resize(1);
msg->controlBytes[0] = static_cast<uint8_t>(0x17u); // Register address for A2B INTTYPE
msg->dataBytes.resize(1, 0);
@ -261,7 +261,7 @@ void example4(const std::shared_ptr<icsneo::Device>& rada2b) {
if(newMsg->type == icsneo::Message::Type::Frame) {
const auto& frame = std::dynamic_pointer_cast<icsneo::Frame>(newMsg);
if(frame && frame->network.getNetID() == icsneo::Network::NetID::I2C2) {
if(frame && frame->network.getNetID() == icsneo::Network::NetID::I2C_02) {
const auto& i2cMessage = std::dynamic_pointer_cast<icsneo::I2CMessage>(frame);
if(!i2cMessage) {

View File

@ -8,7 +8,7 @@
#include "icsneo/communication/message/message.h"
/*
* App errors are responses from the device indicating internal runtime errors
* NOTE: To trigger the app error in this example, disable the HSCAN network on the device
* NOTE: To trigger the app error in this example, disable the DW CAN 01 network on the device
* (e.g. with neoVI Explorer)
*/
int main() {
@ -58,14 +58,14 @@ int main() {
// Prepare a CAN message
std::cout << std::endl << "Transmitting a CAN frame... ";
auto txMessage = std::make_shared<icsneo::CANMessage>();
txMessage->network = icsneo::Network::NetID::HSCAN;
txMessage->network = icsneo::Network::NetID::DWCAN_01;
txMessage->arbid = 0x22;
txMessage->data.insert(txMessage->data.end(), {0xaa, 0xbb, 0xcc});
// The DLC will come from the length of the data vector
txMessage->isExtended = false;
txMessage->isCANFD = false;
// Transmit a CAN message on HSCAN, even though HSCAN is disabled on the device!
// Transmit a CAN message on DW CAN 01, even though DW CAN 01 is disabled on the device!
// Expect to see an app error caught in the callback defined above
ret = device->transmit(txMessage);
std::cout << (ret ? "OK" : "FAIL") << std::endl;

View File

@ -508,7 +508,7 @@ int main() {
std::cout << "Transmitting a normal CAN frame..." << std::endl;
auto msg = std::make_shared<icsneo::CANMessage>();
msg->network = icsneo::Network::NetID::HSCAN;
msg->network = icsneo::Network::NetID::DWCAN_01;
msg->arbid = 0x120;
msg->data.insert(msg->data.end(), {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff});
msg->isExtended = false;
@ -525,7 +525,7 @@ int main() {
/** Example of CAN FD
std::cout << "Transmitting an extended CAN FD frame... " << std::endl;
auto txMessage = std::make_shared<icsneo::CANMessage>();
txMessage->network = icsneo::Network::NetID::HSCAN;
txMessage->network = icsneo::Network::NetID::DWCAN_01;
txMessage->arbid = 0x1C5001C5;
txMessage->data.insert(txMessage->data.end(), {0xaa, 0xbb, 0xcc});
// The DLC will come from the length of the data vector
@ -565,7 +565,7 @@ int main() {
selectedDevice = selectDevice(devices);
// Attempt to set baudrate and apply settings
if(selectedDevice->settings->setBaudrateFor(icsneo::Network::NetID::HSCAN, 250000) && selectedDevice->settings->apply()) {
if(selectedDevice->settings->setBaudrateFor(icsneo::Network::NetID::DWCAN_01, 250000) && selectedDevice->settings->apply()) {
std::cout << "Successfully set HS CAN baudrate for " << selectedDevice->describe() << " to 250k!" << std::endl;
} else {
std::cout << "Failed to set HS CAN baudrate for " << selectedDevice->describe() << " to 250k!" << std::endl << std::endl;
@ -586,7 +586,7 @@ int main() {
selectedDevice = selectDevice(devices);
// Attempt to set baudrate and apply settings
if(selectedDevice->settings->setBaudrateFor(icsneo::Network::NetID::LSFTCAN, 250000) && selectedDevice->settings->apply()) {
if(selectedDevice->settings->setBaudrateFor(icsneo::Network::NetID::LSFTCAN_01, 250000) && selectedDevice->settings->apply()) {
std::cout << "Successfully set LSFT CAN baudrate for " << selectedDevice->describe() << " to 250k!" << std::endl;
} else {
std::cout << "Failed to set LSFT CAN baudrate for " << selectedDevice->describe() << " to 250k!" << std::endl << std::endl;
@ -790,7 +790,7 @@ int main() {
selectedDevice = selectDevice(devices);
std::cout << "Termination is ";
const auto val = selectedDevice->settings->isTerminationEnabledFor(icsneo::Network::NetID::HSCAN);
const auto val = selectedDevice->settings->isTerminationEnabledFor(icsneo::Network::NetID::DWCAN_01);
if(!val.has_value()) {
std::cout << "not available at this time: " << icsneo::GetLastError() << std::endl << std::endl;
break;
@ -807,7 +807,7 @@ int main() {
}
// Attempt to set termination and apply settings
if(selectedDevice->settings->setTerminationFor(icsneo::Network::NetID::HSCAN, selection2 == '1') && selectedDevice->settings->apply()) {
if(selectedDevice->settings->setTerminationFor(icsneo::Network::NetID::DWCAN_01, selection2 == '1') && selectedDevice->settings->apply()) {
std::cout << "Successfully set HS CAN termination for " << selectedDevice->describe() << std::endl;
} else {
std::cout << "Failed to set HS CAN termination for " << selectedDevice->describe() << std::endl;

View File

@ -32,28 +32,28 @@ int main() {
int64_t baud = 19200;
std::cout << "Enable LIN commander resistor... ";
ret = device->settings->setCommanderResistorFor(icsneo::Network::NetID::LIN, true);
std::cout << "Enable LIN 01 commander resistor... ";
ret = device->settings->setCommanderResistorFor(icsneo::Network::NetID::LIN_01, true);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Disable LIN2 commander resistor... ";
ret = device->settings->setCommanderResistorFor(icsneo::Network::NetID::LIN2, false);
std::cout << "Disable LIN 02 commander resistor... ";
ret = device->settings->setCommanderResistorFor(icsneo::Network::NetID::LIN_02, false);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Setting LIN to operate at " << baud << "bit/s... ";
ret = device->settings->setBaudrateFor(icsneo::Network::NetID::LIN, baud);
std::cout << "Setting LIN 01 to operate at " << baud << "bit/s... ";
ret = device->settings->setBaudrateFor(icsneo::Network::NetID::LIN_01, baud);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Setting LIN2 to operate at " << baud << "bit/s... ";
ret = device->settings->setBaudrateFor(icsneo::Network::NetID::LIN2, baud);
std::cout << "Setting LIN 02 to operate at " << baud << "bit/s... ";
ret = device->settings->setBaudrateFor(icsneo::Network::NetID::LIN_02, baud);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Setting LIN mode to NORMAL... ";
ret = device->settings->setLINModeFor(icsneo::Network::NetID::LIN, NORMAL_MODE);
std::cout << "Setting LIN 01 mode to NORMAL... ";
ret = device->settings->setLINModeFor(icsneo::Network::NetID::LIN_01, NORMAL_MODE);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Setting LIN2 mode to NORMAL... ";
ret = device->settings->setLINModeFor(icsneo::Network::NetID::LIN2, NORMAL_MODE);
std::cout << "Setting LIN 02 mode to NORMAL... ";
ret = device->settings->setLINModeFor(icsneo::Network::NetID::LIN_02, NORMAL_MODE);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Applying settings... ";
@ -61,14 +61,14 @@ int main() {
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Getting LIN Baudrate... ";
int64_t readBaud = device->settings->getBaudrateFor(icsneo::Network::NetID::LIN);
int64_t readBaud = device->settings->getBaudrateFor(icsneo::Network::NetID::LIN_01);
if(readBaud < 0)
std::cout << "FAIL" << std::endl;
else
std::cout << "OK, " << (readBaud) << "bit/s" << std::endl;
std::cout << "Getting LIN2 Baudrate... ";
readBaud = device->settings->getBaudrateFor(icsneo::Network::NetID::LIN2);
std::cout << "Getting LIN 02 Baudrate... ";
readBaud = device->settings->getBaudrateFor(icsneo::Network::NetID::LIN_02);
if(readBaud < 0)
std::cout << "FAIL" << std::endl;
else
@ -113,18 +113,18 @@ int main() {
}));
// We can transmit messages
std::cout << "Transmitting a LIN responder data frame... ";
std::cout << "Transmitting a LIN 02 responder data frame... ";
auto lin_r = std::make_shared<icsneo::LINMessage>();
lin_r->network = icsneo::Network::NetID::LIN2;
lin_r->network = icsneo::Network::NetID::LIN_02;
lin_r->ID = 0x11;
lin_r->linMsgType = icsneo::LINMessage::Type::LIN_UPDATE_RESPONDER;
lin_r->data = {0xaa, 0xbb, 0xcc, 0xdd, 0x11, 0x22, 0x33, 0x44};
ret = device->transmit(lin_r); // This will return false if the device does not support LIN
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "Transmitting a LIN commander header... ";
std::cout << "Transmitting a LIN 01 commander header... ";
auto lin_c = std::make_shared<icsneo::LINMessage>();
lin_c->network = icsneo::Network::NetID::LIN;
lin_c->network = icsneo::Network::NetID::LIN_01;
lin_c->ID = 0x11;
lin_c->linMsgType = icsneo::LINMessage::Type::LIN_HEADER_ONLY;
ret = device->transmit(lin_c);
@ -132,9 +132,9 @@ int main() {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::cout << "Transmitting a LIN commander frame with responder data... ";
std::cout << "Transmitting a LIN 01 commander frame with responder data... ";
auto lin_d = std::make_shared<icsneo::LINMessage>();
lin_d->network = icsneo::Network::NetID::LIN;
lin_d->network = icsneo::Network::NetID::LIN_01;
lin_d->ID = 0x22;
lin_d->isEnhancedChecksum = true;
lin_d->linMsgType = icsneo::LINMessage::Type::LIN_COMMANDER_MSG;

View File

@ -117,7 +117,7 @@ int main()
// We can transmit messages to read the PHY ID of BCM89810 PHY
std::cout << "\tTransmitting a MDIO request to read ID on BCM89810...\n";
auto mdio_r = std::make_shared<icsneo::MDIOMessage>();
mdio_r->network = icsneo::Network::NetID::MDIO1;
mdio_r->network = icsneo::Network::NetID::MDIO_01;
mdio_r->phyAddress = 0x00u;
mdio_r->regAddress = 0x02u;
mdio_r->direction = icsneo::MDIOMessage::Direction::Read;
@ -128,7 +128,7 @@ int main()
// We can transmit messages to write to arbitrary register
std::cout << "\tTransmitting a MDIO request to write register on BCM89810...\n";
mdio_r = std::make_shared<icsneo::MDIOMessage>();
mdio_r->network = icsneo::Network::NetID::MDIO1;
mdio_r->network = icsneo::Network::NetID::MDIO_01;
mdio_r->phyAddress = 0x00u;
mdio_r->regAddress = 0x1Bu;
mdio_r->data = {0xAA, 0xAF};
@ -140,7 +140,7 @@ int main()
// We can transmit messages to read back to arbitrary register
std::cout << "\tTransmitting a MDIO request to read register on BCM89810...\n";
mdio_r = std::make_shared<icsneo::MDIOMessage>();
mdio_r->network = icsneo::Network::NetID::MDIO1;
mdio_r->network = icsneo::Network::NetID::MDIO_01;
mdio_r->phyAddress = 0x00u;
mdio_r->regAddress = 0x1Bu;
mdio_r->direction = icsneo::MDIOMessage::Direction::Read;
@ -154,7 +154,7 @@ int main()
// We can transmit messages to read the PHY ID of BCM89810 PHY
std::cout << "\tTransmitting a MDIO request to read ID on 88Q2112...\n";
mdio_r = std::make_shared<icsneo::MDIOMessage>();
mdio_r->network = icsneo::Network::NetID::MDIO1;
mdio_r->network = icsneo::Network::NetID::MDIO_01;
mdio_r->phyAddress = 0x06u;
mdio_r->devAddress = 0x01u;
mdio_r->regAddress = 0x0002u;
@ -166,7 +166,7 @@ int main()
// We can transmit messages to write to arbitrary register
std::cout << "\tTransmitting a MDIO request to write register on 88Q2112...\n";
mdio_r = std::make_shared<icsneo::MDIOMessage>();
mdio_r->network = icsneo::Network::NetID::MDIO1;
mdio_r->network = icsneo::Network::NetID::MDIO_01;
mdio_r->phyAddress = 0x06u;
mdio_r->devAddress = 0x01u;
mdio_r->regAddress = 0x0902u;
@ -179,7 +179,7 @@ int main()
// We can transmit messages to read back to arbitrary register
std::cout << "\tTransmitting a MDIO request to read register on 88Q2112...\n";
mdio_r = std::make_shared<icsneo::MDIOMessage>();
mdio_r->network = icsneo::Network::NetID::MDIO1;
mdio_r->network = icsneo::Network::NetID::MDIO_01;
mdio_r->phyAddress = 0x06u;
mdio_r->devAddress = 0x01u;
mdio_r->regAddress = 0x0902u;

View File

@ -37,39 +37,39 @@ int main() {
}
std::cout << "OK" << std::endl;
std::cout << "\tGetting HSCAN Baudrate... ";
int64_t baud = device->settings->getBaudrateFor(icsneo::Network::NetID::HSCAN);
std::cout << "\tGetting DW CAN 01 Baudrate... ";
int64_t baud = device->settings->getBaudrateFor(icsneo::Network::NetID::DWCAN_01);
if(baud < 0)
std::cout << "FAIL" << std::endl;
else
std::cout << "OK, " << (baud/1000) << "kbit/s" << std::endl;
std::cout << "\tSetting HSCAN to operate at 125kbit/s... ";
ret = device->settings->setBaudrateFor(icsneo::Network::NetID::HSCAN, 125000);
std::cout << "\tSetting DW CAN 01 to operate at 125kbit/s... ";
ret = device->settings->setBaudrateFor(icsneo::Network::NetID::DWCAN_01, 125000);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
// Changes to the settings do not take affect until you call settings->apply()!
// When you get the baudrate here, you're reading what the device is currently operating on
std::cout << "\tGetting HSCAN Baudrate... (expected to be unchanged) ";
baud = device->settings->getBaudrateFor(icsneo::Network::NetID::HSCAN);
std::cout << "\tGetting DW CAN 01 Baudrate... (expected to be unchanged) ";
baud = device->settings->getBaudrateFor(icsneo::Network::NetID::DWCAN_01);
if(baud < 0)
std::cout << "FAIL" << std::endl;
else
std::cout << "OK, " << (baud/1000) << "kbit/s" << std::endl;
std::cout << "\tGetting HSCANFD Baudrate... ";
baud = device->settings->getFDBaudrateFor(icsneo::Network::NetID::HSCAN);
std::cout << "\tGetting DW CAN 01 FD Baudrate... ";
baud = device->settings->getFDBaudrateFor(icsneo::Network::NetID::DWCAN_01);
if(baud < 0)
std::cout << "FAIL" << std::endl;
else
std::cout << "OK, " << (baud/1000) << "kbit/s" << std::endl;
std::cout << "\tSetting HSCANFD to operate at 8Mbit/s... ";
ret = device->settings->setFDBaudrateFor(icsneo::Network::NetID::HSCAN, 8000000);
std::cout << "\tSetting DW CAN 01 FD to operate at 8Mbit/s... ";
ret = device->settings->setFDBaudrateFor(icsneo::Network::NetID::DWCAN_01, 8000000);
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "\tGetting HSCANFD Baudrate... (expected to be unchanged) ";
baud = device->settings->getFDBaudrateFor(icsneo::Network::NetID::HSCAN);
std::cout << "\tGetting DW CAN 01 FD Baudrate... (expected to be unchanged) ";
baud = device->settings->getFDBaudrateFor(icsneo::Network::NetID::DWCAN_01);
if(baud < 0)
std::cout << "FAIL" << std::endl;
else
@ -83,15 +83,15 @@ int main() {
std::cout << (ret ? "OK" : "FAIL") << std::endl;
// Now that we have applied, we expect that our operating baudrates have changed
std::cout << "\tGetting HSCAN Baudrate... ";
baud = device->settings->getBaudrateFor(icsneo::Network::NetID::HSCAN);
std::cout << "\tGetting DW CAN 01 Baudrate... ";
baud = device->settings->getBaudrateFor(icsneo::Network::NetID::DWCAN_01);
if(baud < 0)
std::cout << "FAIL" << std::endl;
else
std::cout << "OK, " << (baud/1000) << "kbit/s" << std::endl;
std::cout << "\tGetting HSCANFD Baudrate... ";
baud = device->settings->getFDBaudrateFor(icsneo::Network::NetID::HSCAN);
std::cout << "\tGetting DW CAN 01 (FD) Baudrate... ";
baud = device->settings->getFDBaudrateFor(icsneo::Network::NetID::DWCAN_01);
if(baud < 0)
std::cout << "FAIL" << std::endl;
else
@ -155,13 +155,13 @@ int main() {
// We can transmit messages
std::cout << "\n\tTransmitting an extended CAN FD frame... ";
auto txMessage5 = std::make_shared<icsneo::CANMessage>();
txMessage5->network = icsneo::Network::NetID::HSCAN;
txMessage5->network = icsneo::Network::NetID::DWCAN_01;
txMessage5->arbid = 0x1C5001C5;
txMessage5->data.insert(txMessage5->data.end(), {0xaa, 0xbb, 0xcc});
// The DLC will come from the length of the data vector
txMessage5->isExtended = true;
txMessage5->isCANFD = true;
ret = device->transmit(txMessage5); // This will return false if the device does not support CAN FD, or does not have HSCAN
ret = device->transmit(txMessage5); // This will return false if the device does not support CAN FD, or does not have DWCAN_01
std::cout << (ret ? "OK" : "FAIL") << std::endl;
// We can also register a handler
@ -290,25 +290,25 @@ int main() {
// We can transmit messages
std::cout << "\tTransmitting an extended CAN FD frame... ";
auto txMessage = std::make_shared<icsneo::CANMessage>();
txMessage->network = icsneo::Network::NetID::HSCAN;
txMessage->network = icsneo::Network::NetID::DWCAN_01;
txMessage->arbid = 0x1C5001C5;
txMessage->data.insert(txMessage->data.end(), {0xaa, 0xbb, 0xcc});
// The DLC will come from the length of the data vector
txMessage->isExtended = true;
txMessage->isCANFD = true;
ret = device->transmit(txMessage); // This will return false if the device does not support CAN FD, or does not have HSCAN
ret = device->transmit(txMessage); // This will return false if the device does not support CAN FD, or does not have DWCAN_01
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::cout << "\tTransmitting an ethernet frame on OP (BR) Ethernet 2... ";
std::cout << "\tTransmitting an ethernet frame on AE 02... ";
auto ethTxMessage = std::make_shared<icsneo::EthernetMessage>();
ethTxMessage->network = icsneo::Network::NetID::OP_Ethernet2;
ethTxMessage->network = icsneo::Network::NetID::AE_02;
ethTxMessage->data.insert(ethTxMessage->data.end(), {
0x00, 0xFC, 0x70, 0x00, 0x01, 0x02, /* Destination MAC */
0x00, 0xFC, 0x70, 0x00, 0x01, 0x01, /* Source MAC */
0x00, 0x00, /* Ether Type */
0x01, 0xC5, 0x01, 0xC5 /* Payload (will automatically be padded on transmit unless you set `ethTxMessage->noPadding`) */
});
ret = device->transmit(ethTxMessage); // This will return false if the device does not support OP (BR) Ethernet 2
ret = device->transmit(ethTxMessage); // This will return false if the device does not support AE 02
std::cout << (ret ? "OK" : "FAIL") << std::endl;
std::vector<icsneo::MiscIO> emisc = device->getEMiscIO();

View File

@ -36,7 +36,7 @@ std::vector<std::shared_ptr<icsneo::Frame>> constructRandomFrames(size_t frameCo
// Short Ethernet
{
auto frame = std::make_shared<icsneo::EthernetMessage>();
frame->network = icsneo::Network::NetID::Ethernet;
frame->network = icsneo::Network::NetID::ETHERNET_01;
frames.push_back(frame);
frame->data.resize(ShortEthSize);
std::generate(frame->data.begin(), frame->data.end(), randByteGen);
@ -46,7 +46,7 @@ std::vector<std::shared_ptr<icsneo::Frame>> constructRandomFrames(size_t frameCo
// Long Ethernet
{
auto frame = std::make_shared<icsneo::EthernetMessage>();
frame->network = icsneo::Network::NetID::Ethernet;
frame->network = icsneo::Network::NetID::ETHERNET_01;
frames.push_back(frame);
frame->data.resize(LongEthSize);
std::generate(frame->data.begin(), frame->data.end(), randByteGen);
@ -56,7 +56,7 @@ std::vector<std::shared_ptr<icsneo::Frame>> constructRandomFrames(size_t frameCo
// Classic CAN
{
auto frame = std::make_shared<icsneo::CANMessage>();
frame->network = icsneo::Network::NetID::HSCAN2;
frame->network = icsneo::Network::NetID::DWCAN_02;
frames.push_back(frame);
frame->data.resize(ClassicCANSize);
@ -67,7 +67,7 @@ std::vector<std::shared_ptr<icsneo::Frame>> constructRandomFrames(size_t frameCo
// CAN FD
{
auto frame = std::make_shared<icsneo::CANMessage>();
frame->network = icsneo::Network::NetID::HSCAN3;
frame->network = icsneo::Network::NetID::DWCAN_03;
frames.push_back(frame);
frame->data.resize(CANFDSize);
std::generate(frame->data.begin(), frame->data.end(), randByteGen);

View File

@ -1,26 +0,0 @@
cmake_minimum_required(VERSION 3.2)
project(icsneocsharp VERSION 0.2.0)
set(CMAKE_CXX_STANDARD 11)
include(GNUInstallDirs)
# Add an include directory like so if desired
#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
# Enable Warnings
if(MSVC)
# Force to always compile with W4
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
else() #if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch -Wno-unknown-pragmas")
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../third-party/libicsneo ${CMAKE_CURRENT_BINARY_DIR}/third-party/libicsneo)
add_library(icsneocsharp SHARED ${CMAKE_CURRENT_SOURCE_DIR}/csharp_wrap.c)
target_link_libraries(icsneocsharp icsneoc)

View File

@ -1,520 +0,0 @@
using System.Collections.Generic;
namespace libicsneocsharp_example {
class InteractiveExample {
private uint msgLimit = 50000;
private neodevice_t selectedDevice;
private List<neodevice_t> devices = new List<neodevice_t>();
private uint numDevices = 0;
private void PrintAllDevices() {
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.");
}
for(int i = 0; i < numDevices; i++) {
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
if(icsneocsharp.icsneo_describeDevice(devices[i], description, ref maxLength)) {
System.Console.Write("[" + (i + 1) + "] " + description.ToString() + "\tConnected: ");
if(icsneocsharp.icsneo_isOpen(devices[i])) {
System.Console.Write("Yes\t");
} else System.Console.Write("No\t");
System.Console.Write("Online: ");
if(icsneocsharp.icsneo_isOnline(devices[i])) {
System.Console.Write("Yes\t");
} else System.Console.Write("No\t");
System.Console.Write("Msg Polling: ");
if(icsneocsharp.icsneo_isMessagePollingEnabled(devices[i])) {
System.Console.Write("On\n");
} else System.Console.Write("Off\n");
} else {
System.Console.WriteLine("Description for device " + (i + 1) + " not available!");
}
}
}
private uint ScanNewDevices() {
neodevice_t newDevices = icsneocsharp.new_neodevice_t_array(99);
int count = 10;
icsneocsharp.icsneo_findAllDevices(newDevices, ref count);
numDevices += (uint) count;
for(int i = 0; i < numDevices; i++) {
devices.Add(icsneocsharp.neodevice_t_array_getitem(newDevices, i));
}
icsneocsharp.delete_neodevice_t_array(newDevices);
return (uint) count;
}
private void PrintMainMenu() {
System.Console.WriteLine("Press the letter next to the function you want to use:");
System.Console.WriteLine("A - List all devices");
System.Console.WriteLine("B - Scan for new devices");
System.Console.WriteLine("C - Open/close");
System.Console.WriteLine("D - Go online/offline");
System.Console.WriteLine("E - Enable/disable message polling");
System.Console.WriteLine("F - Get messages");
System.Console.WriteLine("G - Send message");
System.Console.WriteLine("H - Get events");
System.Console.WriteLine("I - Set HS CAN to 250K");
System.Console.WriteLine("J - Set HS CAN to 500K");
System.Console.WriteLine("X - Exit");
}
void PrintLastError() {
neoevent_t error = new neoevent_t();
if(icsneocsharp.icsneo_getLastError(error))
System.Console.WriteLine("Error 0x" + error.eventNumber + ": " + error.description);
else
System.Console.WriteLine("No errors found!");
}
void PrintAPIEvents() {
neoevent_t events = icsneocsharp.new_neoevent_t_array(99);
int eventCount = 99;
if(icsneocsharp.icsneo_getEvents(events, ref eventCount)) {
if(eventCount == 1) {
neoevent_t evt = icsneocsharp.neoevent_t_array_getitem(events, 0);
System.Console.WriteLine("1 API event found!");
System.Console.WriteLine("Event 0x" + evt.eventNumber + ": " + evt.description);
} else {
System.Console.WriteLine(eventCount + " API events found!");
for(var i = 0; i < eventCount; ++i) {
neoevent_t evt = icsneocsharp.neoevent_t_array_getitem(events, i);
System.Console.WriteLine("Event 0x" + evt.eventNumber + ": " + evt.description);
}
}
} else {
System.Console.WriteLine("Failed to get API events!");
}
icsneocsharp.delete_neoevent_t_array(events);
}
void PrintDeviceEvents(neodevice_t device) {
neoevent_t events = icsneocsharp.new_neoevent_t_array(99);
int eventCount = 99;
if(icsneocsharp.icsneo_getDeviceEvents(device, events, ref eventCount)) {
if(eventCount == 1) {
neoevent_t evt = icsneocsharp.neoevent_t_array_getitem(events, 0);
System.Console.WriteLine("1 device event found!");
System.Console.WriteLine("Event 0x" + evt.eventNumber + ": " + evt.description);
} else {
System.Console.WriteLine(eventCount + " device events found!");
for(var i = 0; i < eventCount; ++i) {
neoevent_t evt = icsneocsharp.neoevent_t_array_getitem(events, i);
System.Console.WriteLine("Event 0x" + evt.eventNumber + ": " + evt.description);
}
}
} else {
System.Console.WriteLine("Failed to get API events!");
}
icsneocsharp.delete_neoevent_t_array(events);
}
private char GetCharInput(List<char> allowed) {
bool found = false;
char key = '0';
while(!found) {
key = System.Console.ReadKey().KeyChar;
System.Console.WriteLine();
foreach(char compare in allowed) {
if(compare == key) {
found = true;
break;
}
}
if(!found) {
System.Console.WriteLine("Input did not match expected options. Please try again.");
}
}
return key;
}
neodevice_t SelectDevice() {
System.Console.WriteLine("Please select a device:");
PrintAllDevices();
System.Console.WriteLine();
int selectedDeviceNum = 10;
while(selectedDeviceNum > numDevices) {
char deviceSelection = GetCharInput(new List<char> { '1', '2', '3', '4', '5', '6', '7', '8', '9' });
selectedDeviceNum = (int)char.GetNumericValue(deviceSelection);
if(selectedDeviceNum > numDevices) {
System.Console.WriteLine("Selected device out of range!");
}
}
System.Console.WriteLine();
return devices[selectedDeviceNum - 1];
}
public void Run() {
neoversion_t version = icsneocsharp.icsneo_getVersion();
System.Console.WriteLine("ICS icsneocsharp.dll version " + version.major + "." + version.minor + "." + version.patch);
System.Console.WriteLine();
while(true) {
PrintMainMenu();
System.Console.WriteLine();
char input = GetCharInput(new List<char> { 'A', 'a', 'B', 'b', 'C', 'c', 'D', 'd', 'E', 'e', 'F', 'f', 'G', 'g', 'H', 'h', 'I', 'i', 'J', 'j', 'X', 'x' });
System.Console.WriteLine();
switch(input) {
// List current devices
case 'A':
goto case 'a';
case 'a':
PrintAllDevices();
System.Console.WriteLine();
break;
// Scan for new devices
case 'B':
goto case 'b';
case 'b': {
var numNewDevices = ScanNewDevices();
if(numNewDevices == 1) {
System.Console.WriteLine("1 new device found!");
} else {
System.Console.WriteLine(numNewDevices + " new devices found!");
}
PrintAllDevices();
System.Console.WriteLine();
break;
}
// Open/close a device
case 'C':
goto case 'c';
case 'c': {
// Select a device and get its description
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = SelectDevice();
// Get the product description for the device
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
icsneocsharp.icsneo_describeDevice(selectedDevice, description, ref maxLength);
System.Console.WriteLine("Would you like to open or close " + description + "?");
System.Console.WriteLine("[1] Open\n[2] Close\n[3] Cancel\n");
char option = GetCharInput(new List<char> { '1', '2', '3' });
System.Console.WriteLine();
switch(option) {
case '1':
// Attempt to open the selected device
if(icsneocsharp.icsneo_openDevice(selectedDevice)) {
System.Console.WriteLine(description + " successfully opened!\n");
} else {
System.Console.WriteLine(description + " failed to open!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
case '2':
// Attempt to close the device
if(icsneocsharp.icsneo_closeDevice(selectedDevice)) {
numDevices--;
System.Console.WriteLine("Successfully closed " + description + "!\n");
devices.Remove(selectedDevice);
selectedDevice = null;
} else {
System.Console.WriteLine("Failed to close " + description.ToString() + "!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
default:
System.Console.WriteLine("Canceling!\n");
break;
}
break;
}
// Go online/offline
case 'D':
goto case 'd';
case 'd': {
// Select a device and get its description
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = SelectDevice();
// Get the product description for the device
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
icsneocsharp.icsneo_describeDevice(selectedDevice, description, ref maxLength);
System.Console.WriteLine("Would you like to have " + description.ToString() + " go online or offline?");
System.Console.WriteLine("[1] Online\n[2] Offline\n[3] Cancel\n");
char option = GetCharInput(new List<char> { '1', '2', '3' });
System.Console.WriteLine();
switch(option) {
case '1':
// Attempt to go online
if(icsneocsharp.icsneo_goOnline(selectedDevice)) {
System.Console.WriteLine(description + " successfully went online!\n");
} else {
System.Console.WriteLine(description + " failed to go online!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
case '2':
// Attempt to go offline
if(icsneocsharp.icsneo_goOffline(selectedDevice)) {
System.Console.WriteLine(description + " successfully went offline!\n");
} else {
System.Console.WriteLine(description + " failed to go offline!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
default:
System.Console.WriteLine("Canceling!\n");
break;
}
break;
}
// Enable/disable message polling
case 'E':
goto case 'e';
case 'e': {
// Select a device and get its description
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = SelectDevice();
// Get the product description for the device
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
icsneocsharp.icsneo_describeDevice(selectedDevice, description, ref maxLength);
System.Console.WriteLine("Would you like to enable or disable message polling for " + description.ToString() + "?");
System.Console.WriteLine("[1] Enable\n[2] Disable\n[3] Cancel\n");
char option = GetCharInput(new List<char> { '1', '2', '3' });
System.Console.WriteLine();
switch(option) {
case '1':
// Attempt to enable message polling
if(icsneocsharp.icsneo_enableMessagePolling(selectedDevice)) {
System.Console.WriteLine("Successfully enabled message polling for " + description.ToString() + "!\n");
} else {
System.Console.WriteLine("Failed to enable message polling for " + description.ToString() + "!\n");
PrintLastError();
System.Console.WriteLine();
}
// Manually setting the polling message limit as done below is optional
// It will default to 20k if not set
// Attempt to set the polling message limit
if(icsneocsharp.icsneo_setPollingMessageLimit(selectedDevice, msgLimit)) {
System.Console.WriteLine("Successfully set message polling limit for " + description.ToString() + "!\n");
} else {
System.Console.WriteLine("Failed to set polling message limit for " + description.ToString() + "!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
case '2':
// Attempt to disable message polling
if(icsneocsharp.icsneo_disableMessagePolling(selectedDevice)) {
System.Console.WriteLine("Successfully disabled message polling for " + description.ToString() + "!\n");
} else {
System.Console.WriteLine("Failed to disable message polling for " + description.ToString() + "!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
default:
System.Console.WriteLine("Canceling!\n");
break;
}
}
break;
case 'F':
goto case 'f';
case 'f': {
// Select a device and get its description
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = SelectDevice();
// Get the product description for the device
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
icsneocsharp.icsneo_describeDevice(selectedDevice, description, ref maxLength);
// Prepare the neomessage_t array and size for reading in the messages
neomessage_t msgs = icsneocsharp.new_neomessage_t_array((int)msgLimit);
int msgCount = (int)msgLimit;
if(!icsneocsharp.icsneo_getMessages(selectedDevice, msgs, ref msgCount, 0)) {
System.Console.WriteLine("Failed to get messages for " + description.ToString() + "!\n");
PrintLastError();
icsneocsharp.delete_neomessage_t_array(msgs);
System.Console.WriteLine();
break;
}
if(msgCount == 1) {
System.Console.WriteLine("1 message received from " + description.ToString() + "!");
} else {
System.Console.WriteLine(msgCount + " messages received from " + description.ToString() + "!");
}
// Print out the received messages
for(int i = 0; i < msgCount; i++) {
neomessage_t msg = icsneocsharp.neomessage_t_array_getitem(msgs, i);
if(msg.type == icsneocsharp.ICSNEO_NETWORK_TYPE_CAN) {
System.Console.Write("\t0x" + "{0:x}" + " [" + msg.length + "] ", icsneocsharp.neomessage_can_t_cast(msg).arbid);
for(int j = 0; j < msg.length; j++) {
System.Console.Write("{0:x} ", icsneocsharp.neomessage_can_t_cast(msg).data[j]);
}
System.Console.WriteLine("(" + msg.timestamp + ")");
} else {
if(msg.netid != 0)
System.Console.WriteLine("\tMessage on netid " + msg.netid + " with length " + msg.length);
}
}
icsneocsharp.delete_neomessage_t_array(msgs);
break;
}
// Send message
case 'G':
goto case 'g';
case 'g': {
// Select a device and get its description
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = SelectDevice();
// Get the product description for the device
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
icsneocsharp.icsneo_describeDevice(selectedDevice, description, ref maxLength);
// Start generating sample msg
neomessage_can_t msg = new neomessage_can_t();
msg.arbid = 0x120;
msg.length = 6;
msg.netid = (ushort)icsneocsharp.ICSNEO_NETID_HSCAN;
msg.data = new byte[6] { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff };
msg.status.canfdFDF = 0;
msg.status.extendedFrame = 0;
msg.status.canfdBRS = 0;
// End generating sample msg
// Attempt to transmit the sample msg
if(icsneocsharp.icsneo_transmit(selectedDevice, icsneocsharp.from_can_neomessage_t_cast(msg))) {
System.Console.WriteLine("Message transmit successful!");
} else {
System.Console.WriteLine("Failed to transmit message to " + description.ToString() + "!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
}
// Get events
case 'H':
goto case 'h';
case 'h':
PrintAPIEvents();
System.Console.WriteLine();
break;
// Set HS CAN to 250k
case 'I':
goto case 'i';
case 'i': {
// Select a device and get its description
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = SelectDevice();
// Get the product description for the device
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
icsneocsharp.icsneo_describeDevice(selectedDevice, description, ref maxLength);
// Attempt to set baudrate and apply settings
if(icsneocsharp.icsneo_setBaudrate(selectedDevice, (ushort)icsneocsharp.ICSNEO_NETID_HSCAN, 250000) && icsneocsharp.icsneo_settingsApply(selectedDevice)) {
System.Console.WriteLine("Successfully set HS CAN baudrate for " + description.ToString() + "to 250k!\n");
} else {
System.Console.WriteLine("Failed to set HS CAN for " + description.ToString() + " to 250k!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
}
// Set HS CAN to 500k
case 'J':
goto case 'j';
case 'j': {
// Select a device and get its description
if(numDevices == 0) {
System.Console.WriteLine("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = SelectDevice();
// Get the product description for the device
System.Text.StringBuilder description = new System.Text.StringBuilder(icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int maxLength = icsneocsharp.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION;
icsneocsharp.icsneo_describeDevice(selectedDevice, description, ref maxLength);
// Attempt to set baudrate and apply settings
if(icsneocsharp.icsneo_setBaudrate(selectedDevice, (ushort)icsneocsharp.ICSNEO_NETID_HSCAN, 500000) && icsneocsharp.icsneo_settingsApply(selectedDevice)) {
System.Console.WriteLine("Successfully set HS CAN baudrate for " + description.ToString() + "to 500k!\n");
} else {
System.Console.WriteLine("Failed to set HS CAN for " + description.ToString() + " to 500k!\n");
PrintLastError();
System.Console.WriteLine();
}
break;
}
case 'X':
goto case 'x';
case 'x':
System.Console.WriteLine("Exiting program");
return;
default:
System.Console.WriteLine("Unexpected input, exiting!");
return;
}
}
}
}
}

View File

@ -1,8 +0,0 @@
namespace libicsneocsharp_example {
class Program {
static void Main(string[] args) {
InteractiveExample example = new InteractiveExample();
example.Run();
}
}
}

View File

@ -1,57 +0,0 @@
# libicsneo C# Example
This is an example console application that uses the icsneocsharp library to control an Intrepid Control Systems hardware device.
## Cloning
This will create a copy of the repository on your local machine.
Run:
```shell
git clone https://github.com/intrepidcs/libicsneo-examples --recursive
```
Alternatively, if you cloned without the `--recursive` flag, you must enter the `libicsneo-examples` folder and run the following:
```shell
git submodule update --recursive --init
```
If you haven't done this, `third-party/libicsneo` will be empty and you won't be able to build!
## Windows using Visual Studio 2017+
### Building the DLLs
#### icsneoc
First, we are going to build the icsneoc library into a .dll file that is used by the C# wrapper to access the library functions.
1. Launch Visual Studio and open the `libicsneo-examples` folder.
2. Choose `File->Open->Cmake...`
3. Navigate to `third-party/libicsneo` and select the `CMakeLists.txt` there.
4. Visual Studio will process the CMake project.
5. Select `Build->Rebuild All`
6. Visual Studio will generate the `icsneoc.dll` file, which can then be found by selecting `Project->Cmake Cache (x64-Debug Only)->Open in Explorer`. If the file cannot be found, search in `libicsneo-examples/third-party/libicsneo/out/build/x64-Debug` and double-check that the build succeeded in step 5.
7. Move the `icsneoc.dll` file to the `/C/Windows/System32` folder.
#### icsneocsharp
Next, we are going to build the wrapper functions into a .dll file that is used to access the library functions in C#.
1. Launch a terminal window and change directories into `libicsneo-examples/libicsneocsharp-example`, then create a build directory by running `mkdir -p build`
2. Enter the build directory with `cd build`
3. Run `cmake ..`
4. Run `cmake --build .`
5. The `icsneocsharp.dll` file will be generated in `libicsneo-examples/libicsneocsharp-example/build/Debug`
6. Move the `icsneocsharp.dll` file to the `/C/Windows/System32` folder.
### Building the example program
1. Choose `File->Open->Project/Solution...`
2. Navigate to `libicsneo-examples/libicsneocsharp-example` and select the `libicsneocsharp-example.sln` there.
3. Visual Studio will process the project.
4. Select `Build->Rebuild Solution`
5. Click on the dropdown arrow attached to the green play button (labelled "Select Startup Item") and select `libicsneocsharp-example`
6. Click on the green play button to run the example.

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class SWIGTYPE_p_time_t {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
internal SWIGTYPE_p_time_t(global::System.IntPtr cPtr, bool futureUse) {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
protected SWIGTYPE_p_time_t() {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_time_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class SWIGTYPE_p_unsigned_char {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
internal SWIGTYPE_p_unsigned_char(global::System.IntPtr cPtr, bool futureUse) {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
protected SWIGTYPE_p_unsigned_char() {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_char obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class SWIGTYPE_p_unsigned_int {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
internal SWIGTYPE_p_unsigned_int(global::System.IntPtr cPtr, bool futureUse) {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
protected SWIGTYPE_p_unsigned_int() {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_int obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class SWIGTYPE_p_unsigned_short {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
internal SWIGTYPE_p_unsigned_short(global::System.IntPtr cPtr, bool futureUse) {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
protected SWIGTYPE_p_unsigned_short() {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_unsigned_short obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class SWIGTYPE_p_void {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
internal SWIGTYPE_p_void(global::System.IntPtr cPtr, bool futureUse) {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
protected SWIGTYPE_p_void() {
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_void obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
}

View File

@ -1,76 +0,0 @@
%module icsneocsharp
%include <windows.i>
%include <typemaps.i>
%include <stdint.i>
%include <carrays.i>
%include <arrays_csharp.i>
#define DLLExport
%typemap(ctype) uint8_t const *data "unsigned char *"
%typemap(imtype, out="System.IntPtr") uint8_t const *data "byte[]"
%typemap(cstype) uint8_t const *data "byte[]"
%typemap(in) uint8_t const *data %{
$1 = $input;
%}
%typemap(csvarin) uint8_t const *data %{
set {
icsneocsharpPINVOKE.$csclazznamedata_set(swigCPtr, value);
}
%}
%typemap(csvarout, excode=SWIGEXCODE2) uint8_t const *data %{
get {
byte[] ret = new byte[this.length];
System.IntPtr data = $imcall;
System.Runtime.InteropServices.Marshal.Copy(data, ret, 0, (int)this.length)$excode;
return ret;
}
%}
%typemap(ctype) char *str "char *"
%typemap(imtype) char *str "System.Text.StringBuilder"
%typemap(cstype) char *str "System.Text.StringBuilder"
%{
#include "icsneo/icsneoc.h"
%}
%apply int *INOUT {size_t *};
%ignore icsneo_addMessageCallback;
%ignore icsneo_removeMessageCallback;
%ignore icsneo_addEventCallback;
%ignore icsneo_removeEventCallback;
%include "icsneo/icsneoc.h"
%include "icsneo/device/neodevice.h"
%include "icsneo/communication/message/neomessage.h"
%include "icsneo/device/devicetype.h"
%include "icsneo/api/version.h"
%include "icsneo/api/event.h"
%include "icsneo/communication/network.h"
%inline %{
static neomessage_can_t* neomessage_can_t_cast(neomessage_t* msg) {
return (neomessage_can_t*) msg;
}
static neomessage_eth_t* neomessage_eth_t_cast(neomessage_t* msg) {
return (neomessage_eth_t*) msg;
}
static neomessage_t* from_can_neomessage_t_cast(neomessage_can_t* msg) {
return (neomessage_t*) msg;
}
static neomessage_t* from_eth_neomessage_t_cast(neomessage_eth_t* msg) {
return (neomessage_t*) msg;
}
%}
%array_functions(neodevice_t, neodevice_t_array);
%array_functions(neoevent_t, neoevent_t_array);
%array_functions(neomessage_t, neomessage_t_array);

File diff suppressed because it is too large Load Diff

View File

@ -1,425 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class icsneocsharp {
public static void icsneo_findAllDevices(neodevice_t devices, ref int count) {
icsneocsharpPINVOKE.icsneo_findAllDevices(neodevice_t.getCPtr(devices), ref count);
}
public static void icsneo_freeUnconnectedDevices() {
icsneocsharpPINVOKE.icsneo_freeUnconnectedDevices();
}
public static bool icsneo_serialNumToString(uint num, System.Text.StringBuilder str, ref int count) {
bool ret = icsneocsharpPINVOKE.icsneo_serialNumToString(num, str, ref count);
return ret;
}
public static uint icsneo_serialStringToNum(System.Text.StringBuilder str) {
uint ret = icsneocsharpPINVOKE.icsneo_serialStringToNum(str);
return ret;
}
public static bool icsneo_isValidNeoDevice(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_isValidNeoDevice(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_openDevice(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_openDevice(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_closeDevice(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_closeDevice(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_isOpen(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_isOpen(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_goOnline(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_goOnline(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_goOffline(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_goOffline(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_isOnline(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_isOnline(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_enableMessagePolling(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_enableMessagePolling(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_disableMessagePolling(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_disableMessagePolling(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_isMessagePollingEnabled(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_isMessagePollingEnabled(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_getMessages(neodevice_t device, neomessage_t messages, ref int items, ulong timeout) {
bool ret = icsneocsharpPINVOKE.icsneo_getMessages(neodevice_t.getCPtr(device), neomessage_t.getCPtr(messages), ref items, timeout);
return ret;
}
public static uint icsneo_getPollingMessageLimit(neodevice_t device) {
uint ret = icsneocsharpPINVOKE.icsneo_getPollingMessageLimit(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_setPollingMessageLimit(neodevice_t device, uint newLimit) {
bool ret = icsneocsharpPINVOKE.icsneo_setPollingMessageLimit(neodevice_t.getCPtr(device), newLimit);
return ret;
}
public static bool icsneo_getProductName(neodevice_t device, System.Text.StringBuilder str, ref int maxLength) {
bool ret = icsneocsharpPINVOKE.icsneo_getProductName(neodevice_t.getCPtr(device), str, ref maxLength);
return ret;
}
public static bool icsneo_getProductNameForType(uint type, System.Text.StringBuilder str, ref int maxLength) {
bool ret = icsneocsharpPINVOKE.icsneo_getProductNameForType(type, str, ref maxLength);
return ret;
}
public static bool icsneo_settingsRefresh(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_settingsRefresh(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_settingsApply(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_settingsApply(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_settingsApplyTemporary(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_settingsApplyTemporary(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_settingsApplyDefaults(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_settingsApplyDefaults(neodevice_t.getCPtr(device));
return ret;
}
public static bool icsneo_settingsApplyDefaultsTemporary(neodevice_t device) {
bool ret = icsneocsharpPINVOKE.icsneo_settingsApplyDefaultsTemporary(neodevice_t.getCPtr(device));
return ret;
}
public static int icsneo_settingsReadStructure(neodevice_t device, SWIGTYPE_p_void structure, uint structureSize) {
int ret = icsneocsharpPINVOKE.icsneo_settingsReadStructure(neodevice_t.getCPtr(device), SWIGTYPE_p_void.getCPtr(structure), structureSize);
return ret;
}
public static bool icsneo_settingsApplyStructure(neodevice_t device, SWIGTYPE_p_void structure, uint structureSize) {
bool ret = icsneocsharpPINVOKE.icsneo_settingsApplyStructure(neodevice_t.getCPtr(device), SWIGTYPE_p_void.getCPtr(structure), structureSize);
return ret;
}
public static bool icsneo_settingsApplyStructureTemporary(neodevice_t device, SWIGTYPE_p_void structure, uint structureSize) {
bool ret = icsneocsharpPINVOKE.icsneo_settingsApplyStructureTemporary(neodevice_t.getCPtr(device), SWIGTYPE_p_void.getCPtr(structure), structureSize);
return ret;
}
public static long icsneo_getBaudrate(neodevice_t device, ushort netid) {
long ret = icsneocsharpPINVOKE.icsneo_getBaudrate(neodevice_t.getCPtr(device), netid);
return ret;
}
public static bool icsneo_setBaudrate(neodevice_t device, ushort netid, long newBaudrate) {
bool ret = icsneocsharpPINVOKE.icsneo_setBaudrate(neodevice_t.getCPtr(device), netid, newBaudrate);
return ret;
}
public static long icsneo_getFDBaudrate(neodevice_t device, ushort netid) {
long ret = icsneocsharpPINVOKE.icsneo_getFDBaudrate(neodevice_t.getCPtr(device), netid);
return ret;
}
public static bool icsneo_setFDBaudrate(neodevice_t device, ushort netid, long newBaudrate) {
bool ret = icsneocsharpPINVOKE.icsneo_setFDBaudrate(neodevice_t.getCPtr(device), netid, newBaudrate);
return ret;
}
public static bool icsneo_transmit(neodevice_t device, neomessage_t message) {
bool ret = icsneocsharpPINVOKE.icsneo_transmit(neodevice_t.getCPtr(device), neomessage_t.getCPtr(message));
return ret;
}
public static bool icsneo_transmitMessages(neodevice_t device, neomessage_t messages, uint count) {
bool ret = icsneocsharpPINVOKE.icsneo_transmitMessages(neodevice_t.getCPtr(device), neomessage_t.getCPtr(messages), count);
return ret;
}
public static void icsneo_setWriteBlocks(neodevice_t device, bool blocks) {
icsneocsharpPINVOKE.icsneo_setWriteBlocks(neodevice_t.getCPtr(device), blocks);
}
public static bool icsneo_describeDevice(neodevice_t device, System.Text.StringBuilder str, ref int maxLength) {
bool ret = icsneocsharpPINVOKE.icsneo_describeDevice(neodevice_t.getCPtr(device), str, ref maxLength);
return ret;
}
public static neoversion_t icsneo_getVersion() {
neoversion_t ret = new neoversion_t(icsneocsharpPINVOKE.icsneo_getVersion(), true);
return ret;
}
public static bool icsneo_getEvents(neoevent_t events, ref int size) {
bool ret = icsneocsharpPINVOKE.icsneo_getEvents(neoevent_t.getCPtr(events), ref size);
return ret;
}
public static bool icsneo_getDeviceEvents(neodevice_t device, neoevent_t events, ref int size) {
bool ret = icsneocsharpPINVOKE.icsneo_getDeviceEvents(neodevice_t.getCPtr(device), neoevent_t.getCPtr(events), ref size);
return ret;
}
public static bool icsneo_getLastError(neoevent_t error) {
bool ret = icsneocsharpPINVOKE.icsneo_getLastError(neoevent_t.getCPtr(error));
return ret;
}
public static void icsneo_discardAllEvents() {
icsneocsharpPINVOKE.icsneo_discardAllEvents();
}
public static void icsneo_discardDeviceEvents(neodevice_t device) {
icsneocsharpPINVOKE.icsneo_discardDeviceEvents(neodevice_t.getCPtr(device));
}
public static void icsneo_setEventLimit(uint newLimit) {
icsneocsharpPINVOKE.icsneo_setEventLimit(newLimit);
}
public static uint icsneo_getEventLimit() {
uint ret = icsneocsharpPINVOKE.icsneo_getEventLimit();
return ret;
}
public static bool icsneo_getSupportedDevices(SWIGTYPE_p_unsigned_int devices, ref int count) {
bool ret = icsneocsharpPINVOKE.icsneo_getSupportedDevices(SWIGTYPE_p_unsigned_int.getCPtr(devices), ref count);
return ret;
}
public static bool icsneo_getTimestampResolution(neodevice_t device, SWIGTYPE_p_unsigned_short resolution) {
bool ret = icsneocsharpPINVOKE.icsneo_getTimestampResolution(neodevice_t.getCPtr(device), SWIGTYPE_p_unsigned_short.getCPtr(resolution));
return ret;
}
public static neomessage_can_t neomessage_can_t_cast(neomessage_t msg) {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_can_t_cast(neomessage_t.getCPtr(msg));
neomessage_can_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_can_t(cPtr, false);
return ret;
}
public static neomessage_eth_t neomessage_eth_t_cast(neomessage_t msg) {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_eth_t_cast(neomessage_t.getCPtr(msg));
neomessage_eth_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_eth_t(cPtr, false);
return ret;
}
public static neomessage_t from_can_neomessage_t_cast(neomessage_can_t msg) {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.from_can_neomessage_t_cast(neomessage_can_t.getCPtr(msg));
neomessage_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_t(cPtr, false);
return ret;
}
public static neomessage_t from_eth_neomessage_t_cast(neomessage_eth_t msg) {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.from_eth_neomessage_t_cast(neomessage_eth_t.getCPtr(msg));
neomessage_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_t(cPtr, false);
return ret;
}
public static neodevice_t new_neodevice_t_array(int nelements) {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.new_neodevice_t_array(nelements);
neodevice_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neodevice_t(cPtr, false);
return ret;
}
public static void delete_neodevice_t_array(neodevice_t ary) {
icsneocsharpPINVOKE.delete_neodevice_t_array(neodevice_t.getCPtr(ary));
}
public static neodevice_t neodevice_t_array_getitem(neodevice_t ary, int index) {
neodevice_t ret = new neodevice_t(icsneocsharpPINVOKE.neodevice_t_array_getitem(neodevice_t.getCPtr(ary), index), true);
return ret;
}
public static void neodevice_t_array_setitem(neodevice_t ary, int index, neodevice_t value) {
icsneocsharpPINVOKE.neodevice_t_array_setitem(neodevice_t.getCPtr(ary), index, neodevice_t.getCPtr(value));
if (icsneocsharpPINVOKE.SWIGPendingException.Pending) throw icsneocsharpPINVOKE.SWIGPendingException.Retrieve();
}
public static neoevent_t new_neoevent_t_array(int nelements) {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.new_neoevent_t_array(nelements);
neoevent_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neoevent_t(cPtr, false);
return ret;
}
public static void delete_neoevent_t_array(neoevent_t ary) {
icsneocsharpPINVOKE.delete_neoevent_t_array(neoevent_t.getCPtr(ary));
}
public static neoevent_t neoevent_t_array_getitem(neoevent_t ary, int index) {
neoevent_t ret = new neoevent_t(icsneocsharpPINVOKE.neoevent_t_array_getitem(neoevent_t.getCPtr(ary), index), true);
return ret;
}
public static void neoevent_t_array_setitem(neoevent_t ary, int index, neoevent_t value) {
icsneocsharpPINVOKE.neoevent_t_array_setitem(neoevent_t.getCPtr(ary), index, neoevent_t.getCPtr(value));
if (icsneocsharpPINVOKE.SWIGPendingException.Pending) throw icsneocsharpPINVOKE.SWIGPendingException.Retrieve();
}
public static neomessage_t new_neomessage_t_array(int nelements) {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.new_neomessage_t_array(nelements);
neomessage_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_t(cPtr, false);
return ret;
}
public static void delete_neomessage_t_array(neomessage_t ary) {
icsneocsharpPINVOKE.delete_neomessage_t_array(neomessage_t.getCPtr(ary));
}
public static neomessage_t neomessage_t_array_getitem(neomessage_t ary, int index) {
neomessage_t ret = new neomessage_t(icsneocsharpPINVOKE.neomessage_t_array_getitem(neomessage_t.getCPtr(ary), index), true);
return ret;
}
public static void neomessage_t_array_setitem(neomessage_t ary, int index, neomessage_t value) {
icsneocsharpPINVOKE.neomessage_t_array_setitem(neomessage_t.getCPtr(ary), index, neomessage_t.getCPtr(value));
if (icsneocsharpPINVOKE.SWIGPendingException.Pending) throw icsneocsharpPINVOKE.SWIGPendingException.Retrieve();
}
public static readonly int ICSNEO_DEVICETYPE_LONGEST_NAME = icsneocsharpPINVOKE.ICSNEO_DEVICETYPE_LONGEST_NAME_get();
public static readonly int ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION = icsneocsharpPINVOKE.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION_get();
public static readonly int ICSNEO_NETID_DEVICE = icsneocsharpPINVOKE.ICSNEO_NETID_DEVICE_get();
public static readonly int ICSNEO_NETID_HSCAN = icsneocsharpPINVOKE.ICSNEO_NETID_HSCAN_get();
public static readonly int ICSNEO_NETID_MSCAN = icsneocsharpPINVOKE.ICSNEO_NETID_MSCAN_get();
public static readonly int ICSNEO_NETID_SWCAN = icsneocsharpPINVOKE.ICSNEO_NETID_SWCAN_get();
public static readonly int ICSNEO_NETID_LSFTCAN = icsneocsharpPINVOKE.ICSNEO_NETID_LSFTCAN_get();
public static readonly int ICSNEO_NETID_FORDSCP = icsneocsharpPINVOKE.ICSNEO_NETID_FORDSCP_get();
public static readonly int ICSNEO_NETID_J1708 = icsneocsharpPINVOKE.ICSNEO_NETID_J1708_get();
public static readonly int ICSNEO_NETID_AUX = icsneocsharpPINVOKE.ICSNEO_NETID_AUX_get();
public static readonly int ICSNEO_NETID_J1850VPW = icsneocsharpPINVOKE.ICSNEO_NETID_J1850VPW_get();
public static readonly int ICSNEO_NETID_ISO = icsneocsharpPINVOKE.ICSNEO_NETID_ISO_get();
public static readonly int ICSNEO_NETID_MAIN51 = icsneocsharpPINVOKE.ICSNEO_NETID_MAIN51_get();
public static readonly int ICSNEO_NETID_RED = icsneocsharpPINVOKE.ICSNEO_NETID_RED_get();
public static readonly int ICSNEO_NETID_SCI = icsneocsharpPINVOKE.ICSNEO_NETID_SCI_get();
public static readonly int ICSNEO_NETID_ISO2 = icsneocsharpPINVOKE.ICSNEO_NETID_ISO2_get();
public static readonly int ICSNEO_NETID_ISO14230 = icsneocsharpPINVOKE.ICSNEO_NETID_ISO14230_get();
public static readonly int ICSNEO_NETID_LIN = icsneocsharpPINVOKE.ICSNEO_NETID_LIN_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET1 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET1_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET2 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET2_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET3 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET3_get();
public static readonly int ICSNEO_NETID_RED_EXT_MEMORYREAD = icsneocsharpPINVOKE.ICSNEO_NETID_RED_EXT_MEMORYREAD_get();
public static readonly int ICSNEO_NETID_RED_INT_MEMORYREAD = icsneocsharpPINVOKE.ICSNEO_NETID_RED_INT_MEMORYREAD_get();
public static readonly int ICSNEO_NETID_RED_DFLASH_READ = icsneocsharpPINVOKE.ICSNEO_NETID_RED_DFLASH_READ_get();
public static readonly int ICSNEO_NETID_RED_SDCARD_READ = icsneocsharpPINVOKE.ICSNEO_NETID_RED_SDCARD_READ_get();
public static readonly int ICSNEO_NETID_CAN_ERRBITS = icsneocsharpPINVOKE.ICSNEO_NETID_CAN_ERRBITS_get();
public static readonly int ICSNEO_NETID_RED_DFLASH_WRITE_DONE = icsneocsharpPINVOKE.ICSNEO_NETID_RED_DFLASH_WRITE_DONE_get();
public static readonly int ICSNEO_NETID_RED_WAVE_CAN1_LOGICAL = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_CAN1_LOGICAL_get();
public static readonly int ICSNEO_NETID_RED_WAVE_CAN2_LOGICAL = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_CAN2_LOGICAL_get();
public static readonly int ICSNEO_NETID_RED_WAVE_LIN1_LOGICAL = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_LIN1_LOGICAL_get();
public static readonly int ICSNEO_NETID_RED_WAVE_LIN2_LOGICAL = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_LIN2_LOGICAL_get();
public static readonly int ICSNEO_NETID_RED_WAVE_LIN1_ANALOG = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_LIN1_ANALOG_get();
public static readonly int ICSNEO_NETID_RED_WAVE_LIN2_ANALOG = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_LIN2_ANALOG_get();
public static readonly int ICSNEO_NETID_RED_WAVE_MISC_ANALOG = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_MISC_ANALOG_get();
public static readonly int ICSNEO_NETID_RED_WAVE_MISCDIO2_LOGICAL = icsneocsharpPINVOKE.ICSNEO_NETID_RED_WAVE_MISCDIO2_LOGICAL_get();
public static readonly int ICSNEO_NETID_RED_NETWORK_COM_ENABLE_EX = icsneocsharpPINVOKE.ICSNEO_NETID_RED_NETWORK_COM_ENABLE_EX_get();
public static readonly int ICSNEO_NETID_RED_NEOVI_NETWORK = icsneocsharpPINVOKE.ICSNEO_NETID_RED_NEOVI_NETWORK_get();
public static readonly int ICSNEO_NETID_RED_READ_BAUD_SETTINGS = icsneocsharpPINVOKE.ICSNEO_NETID_RED_READ_BAUD_SETTINGS_get();
public static readonly int ICSNEO_NETID_RED_OLDFORMAT = icsneocsharpPINVOKE.ICSNEO_NETID_RED_OLDFORMAT_get();
public static readonly int ICSNEO_NETID_RED_SCOPE_CAPTURE = icsneocsharpPINVOKE.ICSNEO_NETID_RED_SCOPE_CAPTURE_get();
public static readonly int ICSNEO_NETID_RED_HARDWARE_EXCEP = icsneocsharpPINVOKE.ICSNEO_NETID_RED_HARDWARE_EXCEP_get();
public static readonly int ICSNEO_NETID_RED_GET_RTC = icsneocsharpPINVOKE.ICSNEO_NETID_RED_GET_RTC_get();
public static readonly int ICSNEO_NETID_ISO3 = icsneocsharpPINVOKE.ICSNEO_NETID_ISO3_get();
public static readonly int ICSNEO_NETID_HSCAN2 = icsneocsharpPINVOKE.ICSNEO_NETID_HSCAN2_get();
public static readonly int ICSNEO_NETID_HSCAN3 = icsneocsharpPINVOKE.ICSNEO_NETID_HSCAN3_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET4 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET4_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET5 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET5_get();
public static readonly int ICSNEO_NETID_ISO4 = icsneocsharpPINVOKE.ICSNEO_NETID_ISO4_get();
public static readonly int ICSNEO_NETID_LIN2 = icsneocsharpPINVOKE.ICSNEO_NETID_LIN2_get();
public static readonly int ICSNEO_NETID_LIN3 = icsneocsharpPINVOKE.ICSNEO_NETID_LIN3_get();
public static readonly int ICSNEO_NETID_LIN4 = icsneocsharpPINVOKE.ICSNEO_NETID_LIN4_get();
public static readonly int ICSNEO_NETID_RED_APP_ERROR = icsneocsharpPINVOKE.ICSNEO_NETID_RED_APP_ERROR_get();
public static readonly int ICSNEO_NETID_CGI = icsneocsharpPINVOKE.ICSNEO_NETID_CGI_get();
public static readonly int ICSNEO_NETID_RESET_STATUS = icsneocsharpPINVOKE.ICSNEO_NETID_RESET_STATUS_get();
public static readonly int ICSNEO_NETID_FB_STATUS = icsneocsharpPINVOKE.ICSNEO_NETID_FB_STATUS_get();
public static readonly int ICSNEO_NETID_APP_SIGNAL_STATUS = icsneocsharpPINVOKE.ICSNEO_NETID_APP_SIGNAL_STATUS_get();
public static readonly int ICSNEO_NETID_READ_DATALINK_CM_TX_MSG = icsneocsharpPINVOKE.ICSNEO_NETID_READ_DATALINK_CM_TX_MSG_get();
public static readonly int ICSNEO_NETID_READ_DATALINK_CM_RX_MSG = icsneocsharpPINVOKE.ICSNEO_NETID_READ_DATALINK_CM_RX_MSG_get();
public static readonly int ICSNEO_NETID_LOGGING_OVERFLOW = icsneocsharpPINVOKE.ICSNEO_NETID_LOGGING_OVERFLOW_get();
public static readonly int ICSNEO_NETID_READ_SETTINGS = icsneocsharpPINVOKE.ICSNEO_NETID_READ_SETTINGS_get();
public static readonly int ICSNEO_NETID_HSCAN4 = icsneocsharpPINVOKE.ICSNEO_NETID_HSCAN4_get();
public static readonly int ICSNEO_NETID_HSCAN5 = icsneocsharpPINVOKE.ICSNEO_NETID_HSCAN5_get();
public static readonly int ICSNEO_NETID_RS232 = icsneocsharpPINVOKE.ICSNEO_NETID_RS232_get();
public static readonly int ICSNEO_NETID_UART = icsneocsharpPINVOKE.ICSNEO_NETID_UART_get();
public static readonly int ICSNEO_NETID_UART2 = icsneocsharpPINVOKE.ICSNEO_NETID_UART2_get();
public static readonly int ICSNEO_NETID_UART3 = icsneocsharpPINVOKE.ICSNEO_NETID_UART3_get();
public static readonly int ICSNEO_NETID_UART4 = icsneocsharpPINVOKE.ICSNEO_NETID_UART4_get();
public static readonly int ICSNEO_NETID_SWCAN2 = icsneocsharpPINVOKE.ICSNEO_NETID_SWCAN2_get();
public static readonly int ICSNEO_NETID_ETHERNET_DAQ = icsneocsharpPINVOKE.ICSNEO_NETID_ETHERNET_DAQ_get();
public static readonly int ICSNEO_NETID_DATA_TO_HOST = icsneocsharpPINVOKE.ICSNEO_NETID_DATA_TO_HOST_get();
public static readonly int ICSNEO_NETID_TEXTAPI_TO_HOST = icsneocsharpPINVOKE.ICSNEO_NETID_TEXTAPI_TO_HOST_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET6 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET6_get();
public static readonly int ICSNEO_NETID_RED_VBAT = icsneocsharpPINVOKE.ICSNEO_NETID_RED_VBAT_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET7 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET7_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET8 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET8_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET9 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET9_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET10 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET10_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET11 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET11_get();
public static readonly int ICSNEO_NETID_FLEXRAY1A = icsneocsharpPINVOKE.ICSNEO_NETID_FLEXRAY1A_get();
public static readonly int ICSNEO_NETID_FLEXRAY1B = icsneocsharpPINVOKE.ICSNEO_NETID_FLEXRAY1B_get();
public static readonly int ICSNEO_NETID_FLEXRAY2A = icsneocsharpPINVOKE.ICSNEO_NETID_FLEXRAY2A_get();
public static readonly int ICSNEO_NETID_FLEXRAY2B = icsneocsharpPINVOKE.ICSNEO_NETID_FLEXRAY2B_get();
public static readonly int ICSNEO_NETID_LIN5 = icsneocsharpPINVOKE.ICSNEO_NETID_LIN5_get();
public static readonly int ICSNEO_NETID_FLEXRAY = icsneocsharpPINVOKE.ICSNEO_NETID_FLEXRAY_get();
public static readonly int ICSNEO_NETID_FLEXRAY2 = icsneocsharpPINVOKE.ICSNEO_NETID_FLEXRAY2_get();
public static readonly int ICSNEO_NETID_OP_ETHERNET12 = icsneocsharpPINVOKE.ICSNEO_NETID_OP_ETHERNET12_get();
public static readonly int ICSNEO_NETID_MOST25 = icsneocsharpPINVOKE.ICSNEO_NETID_MOST25_get();
public static readonly int ICSNEO_NETID_MOST50 = icsneocsharpPINVOKE.ICSNEO_NETID_MOST50_get();
public static readonly int ICSNEO_NETID_MOST150 = icsneocsharpPINVOKE.ICSNEO_NETID_MOST150_get();
public static readonly int ICSNEO_NETID_ETHERNET = icsneocsharpPINVOKE.ICSNEO_NETID_ETHERNET_get();
public static readonly int ICSNEO_NETID_GMFSA = icsneocsharpPINVOKE.ICSNEO_NETID_GMFSA_get();
public static readonly int ICSNEO_NETID_TCP = icsneocsharpPINVOKE.ICSNEO_NETID_TCP_get();
public static readonly int ICSNEO_NETID_HSCAN6 = icsneocsharpPINVOKE.ICSNEO_NETID_HSCAN6_get();
public static readonly int ICSNEO_NETID_HSCAN7 = icsneocsharpPINVOKE.ICSNEO_NETID_HSCAN7_get();
public static readonly int ICSNEO_NETID_LIN6 = icsneocsharpPINVOKE.ICSNEO_NETID_LIN6_get();
public static readonly int ICSNEO_NETID_LSFTCAN2 = icsneocsharpPINVOKE.ICSNEO_NETID_LSFTCAN2_get();
public static readonly int ICSNEO_NETID_HW_COM_LATENCY_TEST = icsneocsharpPINVOKE.ICSNEO_NETID_HW_COM_LATENCY_TEST_get();
public static readonly int ICSNEO_NETID_DEVICE_STATUS = icsneocsharpPINVOKE.ICSNEO_NETID_DEVICE_STATUS_get();
public static readonly int ICSNEO_NETID_ANY = icsneocsharpPINVOKE.ICSNEO_NETID_ANY_get();
public static readonly int ICSNEO_NETID_INVALID = icsneocsharpPINVOKE.ICSNEO_NETID_INVALID_get();
public static readonly int ICSNEO_NETWORK_TYPE_INVALID = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_INVALID_get();
public static readonly int ICSNEO_NETWORK_TYPE_INTERNAL = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_INTERNAL_get();
public static readonly int ICSNEO_NETWORK_TYPE_CAN = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_CAN_get();
public static readonly int ICSNEO_NETWORK_TYPE_LIN = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_LIN_get();
public static readonly int ICSNEO_NETWORK_TYPE_FLEXRAY = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_FLEXRAY_get();
public static readonly int ICSNEO_NETWORK_TYPE_MOST = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_MOST_get();
public static readonly int ICSNEO_NETWORK_TYPE_ETHERNET = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_ETHERNET_get();
public static readonly int ICSNEO_NETWORK_TYPE_ANY = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_ANY_get();
public static readonly int ICSNEO_NETWORK_TYPE_OTHER = icsneocsharpPINVOKE.ICSNEO_NETWORK_TYPE_OTHER_get();
}

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>libicsneocsharp_example</RootNamespace>
</PropertyGroup>
</Project>

View File

@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28922.388
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "libicsneocsharp-example", "libicsneocsharp-example.csproj", "{391FCF02-39BB-4C81-AE99-6785A7EA13A1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{391FCF02-39BB-4C81-AE99-6785A7EA13A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{391FCF02-39BB-4C81-AE99-6785A7EA13A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{391FCF02-39BB-4C81-AE99-6785A7EA13A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{391FCF02-39BB-4C81-AE99-6785A7EA13A1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9610ED61-57FA-46BD-A071-DC7DB7BAC3A9}
EndGlobalSection
EndGlobal

View File

@ -1,90 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class neodevice_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal neodevice_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neodevice_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~neodevice_t() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneocsharpPINVOKE.delete_neodevice_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public SWIGTYPE_p_void device {
set {
icsneocsharpPINVOKE.neodevice_t_device_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neodevice_t_device_get(swigCPtr);
SWIGTYPE_p_void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
return ret;
}
}
public int handle {
set {
icsneocsharpPINVOKE.neodevice_t_handle_set(swigCPtr, value);
}
get {
int ret = icsneocsharpPINVOKE.neodevice_t_handle_get(swigCPtr);
return ret;
}
}
public uint type {
set {
icsneocsharpPINVOKE.neodevice_t_type_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neodevice_t_type_get(swigCPtr);
return ret;
}
}
public string serial {
set {
icsneocsharpPINVOKE.neodevice_t_serial_set(swigCPtr, value);
}
get {
string ret = icsneocsharpPINVOKE.neodevice_t_serial_get(swigCPtr);
return ret;
}
}
public neodevice_t() : this(icsneocsharpPINVOKE.new_neodevice_t(), true) {
}
}

View File

@ -1,112 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class neoevent_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal neoevent_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neoevent_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~neoevent_t() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneocsharpPINVOKE.delete_neoevent_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public string description {
set {
icsneocsharpPINVOKE.neoevent_t_description_set(swigCPtr, value);
}
get {
string ret = icsneocsharpPINVOKE.neoevent_t_description_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_time_t timestamp {
set {
icsneocsharpPINVOKE.neoevent_t_timestamp_set(swigCPtr, SWIGTYPE_p_time_t.getCPtr(value));
if (icsneocsharpPINVOKE.SWIGPendingException.Pending) throw icsneocsharpPINVOKE.SWIGPendingException.Retrieve();
}
get {
SWIGTYPE_p_time_t ret = new SWIGTYPE_p_time_t(icsneocsharpPINVOKE.neoevent_t_timestamp_get(swigCPtr), true);
if (icsneocsharpPINVOKE.SWIGPendingException.Pending) throw icsneocsharpPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public uint eventNumber {
set {
icsneocsharpPINVOKE.neoevent_t_eventNumber_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neoevent_t_eventNumber_get(swigCPtr);
return ret;
}
}
public byte severity {
set {
icsneocsharpPINVOKE.neoevent_t_severity_set(swigCPtr, value);
}
get {
byte ret = icsneocsharpPINVOKE.neoevent_t_severity_get(swigCPtr);
return ret;
}
}
public string serial {
set {
icsneocsharpPINVOKE.neoevent_t_serial_set(swigCPtr, value);
}
get {
string ret = icsneocsharpPINVOKE.neoevent_t_serial_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_unsigned_char reserved {
set {
icsneocsharpPINVOKE.neoevent_t_reserved_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neoevent_t_reserved_get(swigCPtr);
SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
return ret;
}
}
public neoevent_t() : this(icsneocsharpPINVOKE.new_neoevent_t(), true) {
}
}

View File

@ -1,155 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class neomessage_can_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal neomessage_can_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neomessage_can_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~neomessage_can_t() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneocsharpPINVOKE.delete_neomessage_can_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public neomessage_statusbitfield_t status {
set {
icsneocsharpPINVOKE.neomessage_can_t_status_set(swigCPtr, neomessage_statusbitfield_t.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_can_t_status_get(swigCPtr);
neomessage_statusbitfield_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_statusbitfield_t(cPtr, false);
return ret;
}
}
public ulong timestamp {
set {
icsneocsharpPINVOKE.neomessage_can_t_timestamp_set(swigCPtr, value);
}
get {
ulong ret = icsneocsharpPINVOKE.neomessage_can_t_timestamp_get(swigCPtr);
return ret;
}
}
public ulong timestampReserved {
set {
icsneocsharpPINVOKE.neomessage_can_t_timestampReserved_set(swigCPtr, value);
}
get {
ulong ret = icsneocsharpPINVOKE.neomessage_can_t_timestampReserved_get(swigCPtr);
return ret;
}
}
public byte[] data {
set {
icsneocsharpPINVOKE.neomessage_can_t_data_set(swigCPtr, value);
}
get {
byte[] ret = new byte[this.length];
System.IntPtr data = icsneocsharpPINVOKE.neomessage_can_t_data_get(swigCPtr);
System.Runtime.InteropServices.Marshal.Copy(data, ret, 0, (int)this.length);
return ret;
}
}
public uint length {
set {
icsneocsharpPINVOKE.neomessage_can_t_length_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_can_t_length_get(swigCPtr);
return ret;
}
}
public uint arbid {
set {
icsneocsharpPINVOKE.neomessage_can_t_arbid_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_can_t_arbid_get(swigCPtr);
return ret;
}
}
public ushort netid {
set {
icsneocsharpPINVOKE.neomessage_can_t_netid_set(swigCPtr, value);
}
get {
ushort ret = icsneocsharpPINVOKE.neomessage_can_t_netid_get(swigCPtr);
return ret;
}
}
public byte type {
set {
icsneocsharpPINVOKE.neomessage_can_t_type_set(swigCPtr, value);
}
get {
byte ret = icsneocsharpPINVOKE.neomessage_can_t_type_get(swigCPtr);
return ret;
}
}
public byte dlcOnWire {
set {
icsneocsharpPINVOKE.neomessage_can_t_dlcOnWire_set(swigCPtr, value);
}
get {
byte ret = icsneocsharpPINVOKE.neomessage_can_t_dlcOnWire_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_unsigned_char reserved {
set {
icsneocsharpPINVOKE.neomessage_can_t_reserved_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_can_t_reserved_get(swigCPtr);
SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
return ret;
}
}
public neomessage_can_t() : this(icsneocsharpPINVOKE.new_neomessage_can_t(), true) {
}
}

View File

@ -1,156 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class neomessage_eth_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal neomessage_eth_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neomessage_eth_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~neomessage_eth_t() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneocsharpPINVOKE.delete_neomessage_eth_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public neomessage_statusbitfield_t status {
set {
icsneocsharpPINVOKE.neomessage_eth_t_status_set(swigCPtr, neomessage_statusbitfield_t.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_eth_t_status_get(swigCPtr);
neomessage_statusbitfield_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_statusbitfield_t(cPtr, false);
return ret;
}
}
public ulong timestamp {
set {
icsneocsharpPINVOKE.neomessage_eth_t_timestamp_set(swigCPtr, value);
}
get {
ulong ret = icsneocsharpPINVOKE.neomessage_eth_t_timestamp_get(swigCPtr);
return ret;
}
}
public ulong timestampReserved {
set {
icsneocsharpPINVOKE.neomessage_eth_t_timestampReserved_set(swigCPtr, value);
}
get {
ulong ret = icsneocsharpPINVOKE.neomessage_eth_t_timestampReserved_get(swigCPtr);
return ret;
}
}
public byte[] data {
set {
icsneocsharpPINVOKE.neomessage_eth_t_data_set(swigCPtr, value);
}
get {
byte[] ret = new byte[this.length];
System.IntPtr data = icsneocsharpPINVOKE.neomessage_eth_t_data_get(swigCPtr);
System.Runtime.InteropServices.Marshal.Copy(data, ret, 0, (int)this.length);
return ret;
}
}
public uint length {
set {
icsneocsharpPINVOKE.neomessage_eth_t_length_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_eth_t_length_get(swigCPtr);
return ret;
}
}
public byte preemptionFlags {
set {
icsneocsharpPINVOKE.neomessage_eth_t_preemptionFlags_set(swigCPtr, value);
}
get {
byte ret = icsneocsharpPINVOKE.neomessage_eth_t_preemptionFlags_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_unsigned_char reservedHeader {
set {
icsneocsharpPINVOKE.neomessage_eth_t_reservedHeader_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_eth_t_reservedHeader_get(swigCPtr);
SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
return ret;
}
}
public ushort netid {
set {
icsneocsharpPINVOKE.neomessage_eth_t_netid_set(swigCPtr, value);
}
get {
ushort ret = icsneocsharpPINVOKE.neomessage_eth_t_netid_get(swigCPtr);
return ret;
}
}
public byte type {
set {
icsneocsharpPINVOKE.neomessage_eth_t_type_set(swigCPtr, value);
}
get {
byte ret = icsneocsharpPINVOKE.neomessage_eth_t_type_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_unsigned_char reserved {
set {
icsneocsharpPINVOKE.neomessage_eth_t_reserved_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_eth_t_reserved_get(swigCPtr);
SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
return ret;
}
}
public neomessage_eth_t() : this(icsneocsharpPINVOKE.new_neomessage_eth_t(), true) {
}
}

View File

@ -1,610 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class neomessage_statusbitfield_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal neomessage_statusbitfield_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neomessage_statusbitfield_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~neomessage_statusbitfield_t() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneocsharpPINVOKE.delete_neomessage_statusbitfield_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public uint globalError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_globalError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_globalError_get(swigCPtr);
return ret;
}
}
public uint transmitMessage {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_transmitMessage_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_transmitMessage_get(swigCPtr);
return ret;
}
}
public uint extendedFrame {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_extendedFrame_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_extendedFrame_get(swigCPtr);
return ret;
}
}
public uint remoteFrame {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_remoteFrame_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_remoteFrame_get(swigCPtr);
return ret;
}
}
public uint crcError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_crcError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_crcError_get(swigCPtr);
return ret;
}
}
public uint canErrorPassive {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canErrorPassive_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canErrorPassive_get(swigCPtr);
return ret;
}
}
public uint incompleteFrame {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_incompleteFrame_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_incompleteFrame_get(swigCPtr);
return ret;
}
}
public uint lostArbitration {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_lostArbitration_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_lostArbitration_get(swigCPtr);
return ret;
}
}
public uint undefinedError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_undefinedError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_undefinedError_get(swigCPtr);
return ret;
}
}
public uint canBusOff {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canBusOff_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canBusOff_get(swigCPtr);
return ret;
}
}
public uint canErrorWarning {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canErrorWarning_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canErrorWarning_get(swigCPtr);
return ret;
}
}
public uint canBusShortedPlus {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canBusShortedPlus_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canBusShortedPlus_get(swigCPtr);
return ret;
}
}
public uint canBusShortedGround {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canBusShortedGround_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canBusShortedGround_get(swigCPtr);
return ret;
}
}
public uint checksumError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_checksumError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_checksumError_get(swigCPtr);
return ret;
}
}
public uint badMessageBitTimeError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_badMessageBitTimeError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_badMessageBitTimeError_get(swigCPtr);
return ret;
}
}
public uint ifrData {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_ifrData_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_ifrData_get(swigCPtr);
return ret;
}
}
public uint hardwareCommError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_hardwareCommError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_hardwareCommError_get(swigCPtr);
return ret;
}
}
public uint expectedLengthError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_expectedLengthError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_expectedLengthError_get(swigCPtr);
return ret;
}
}
public uint incomingNoMatch {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_incomingNoMatch_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_incomingNoMatch_get(swigCPtr);
return ret;
}
}
public uint statusBreak {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_statusBreak_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_statusBreak_get(swigCPtr);
return ret;
}
}
public uint avsiRecOverflow {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_avsiRecOverflow_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_avsiRecOverflow_get(swigCPtr);
return ret;
}
}
public uint testTrigger {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_testTrigger_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_testTrigger_get(swigCPtr);
return ret;
}
}
public uint audioComment {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_audioComment_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_audioComment_get(swigCPtr);
return ret;
}
}
public uint gpsData {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_gpsData_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_gpsData_get(swigCPtr);
return ret;
}
}
public uint analogDigitalInput {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_analogDigitalInput_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_analogDigitalInput_get(swigCPtr);
return ret;
}
}
public uint textComment {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_textComment_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_textComment_get(swigCPtr);
return ret;
}
}
public uint networkMessageType {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_networkMessageType_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_networkMessageType_get(swigCPtr);
return ret;
}
}
public uint vsiTXUnderrun {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_vsiTXUnderrun_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_vsiTXUnderrun_get(swigCPtr);
return ret;
}
}
public uint vsiIFRCRCBit {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_vsiIFRCRCBit_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_vsiIFRCRCBit_get(swigCPtr);
return ret;
}
}
public uint initMessage {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_initMessage_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_initMessage_get(swigCPtr);
return ret;
}
}
public uint flexraySecondStartupFrame {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_flexraySecondStartupFrame_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_flexraySecondStartupFrame_get(swigCPtr);
return ret;
}
}
public uint extended {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_extended_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_extended_get(swigCPtr);
return ret;
}
}
public uint hasValue {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_hasValue_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_hasValue_get(swigCPtr);
return ret;
}
}
public uint valueIsBoolean {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_valueIsBoolean_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_valueIsBoolean_get(swigCPtr);
return ret;
}
}
public uint highVoltage {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_highVoltage_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_highVoltage_get(swigCPtr);
return ret;
}
}
public uint longMessage {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_longMessage_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_longMessage_get(swigCPtr);
return ret;
}
}
public uint globalChange {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_globalChange_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_globalChange_get(swigCPtr);
return ret;
}
}
public uint errorFrame {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_errorFrame_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_errorFrame_get(swigCPtr);
return ret;
}
}
public uint endOfLongMessage {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_endOfLongMessage_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_endOfLongMessage_get(swigCPtr);
return ret;
}
}
public uint linErrorRXBreakNotZero {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXBreakNotZero_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXBreakNotZero_get(swigCPtr);
return ret;
}
}
public uint linErrorRXBreakTooShort {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXBreakTooShort_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXBreakTooShort_get(swigCPtr);
return ret;
}
}
public uint linErrorRXSyncNot55 {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXSyncNot55_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXSyncNot55_get(swigCPtr);
return ret;
}
}
public uint linErrorRXDataGreaterEight {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXDataGreaterEight_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorRXDataGreaterEight_get(swigCPtr);
return ret;
}
}
public uint linErrorTXRXMismatch {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorTXRXMismatch_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorTXRXMismatch_get(swigCPtr);
return ret;
}
}
public uint linErrorMessageIDParity {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorMessageIDParity_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linErrorMessageIDParity_get(swigCPtr);
return ret;
}
}
public uint linSyncFrameError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linSyncFrameError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linSyncFrameError_get(swigCPtr);
return ret;
}
}
public uint linIDFrameError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linIDFrameError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linIDFrameError_get(swigCPtr);
return ret;
}
}
public uint linSlaveByteError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linSlaveByteError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linSlaveByteError_get(swigCPtr);
return ret;
}
}
public uint rxTimeoutError {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_rxTimeoutError_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_rxTimeoutError_get(swigCPtr);
return ret;
}
}
public uint linNoSlaveData {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_linNoSlaveData_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_linNoSlaveData_get(swigCPtr);
return ret;
}
}
public uint canfdESI {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdESI_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdESI_get(swigCPtr);
return ret;
}
}
public uint canfdIDE {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdIDE_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdIDE_get(swigCPtr);
return ret;
}
}
public uint canfdRTR {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdRTR_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdRTR_get(swigCPtr);
return ret;
}
}
public uint canfdFDF {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdFDF_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdFDF_get(swigCPtr);
return ret;
}
}
public uint canfdBRS {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdBRS_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_statusbitfield_t_canfdBRS_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_unsigned_int statusBitfield {
set {
icsneocsharpPINVOKE.neomessage_statusbitfield_t_statusBitfield_set(swigCPtr, SWIGTYPE_p_unsigned_int.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_statusbitfield_t_statusBitfield_get(swigCPtr);
SWIGTYPE_p_unsigned_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_int(cPtr, false);
return ret;
}
}
public neomessage_statusbitfield_t() : this(icsneocsharpPINVOKE.new_neomessage_statusbitfield_t(), true) {
}
}

View File

@ -1,146 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class neomessage_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal neomessage_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neomessage_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~neomessage_t() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneocsharpPINVOKE.delete_neomessage_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public neomessage_statusbitfield_t status {
set {
icsneocsharpPINVOKE.neomessage_t_status_set(swigCPtr, neomessage_statusbitfield_t.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_t_status_get(swigCPtr);
neomessage_statusbitfield_t ret = (cPtr == global::System.IntPtr.Zero) ? null : new neomessage_statusbitfield_t(cPtr, false);
return ret;
}
}
public ulong timestamp {
set {
icsneocsharpPINVOKE.neomessage_t_timestamp_set(swigCPtr, value);
}
get {
ulong ret = icsneocsharpPINVOKE.neomessage_t_timestamp_get(swigCPtr);
return ret;
}
}
public ulong timestampReserved {
set {
icsneocsharpPINVOKE.neomessage_t_timestampReserved_set(swigCPtr, value);
}
get {
ulong ret = icsneocsharpPINVOKE.neomessage_t_timestampReserved_get(swigCPtr);
return ret;
}
}
public byte[] data {
set {
icsneocsharpPINVOKE.neomessage_t_data_set(swigCPtr, value);
}
get {
byte[] ret = new byte[this.length];
System.IntPtr data = icsneocsharpPINVOKE.neomessage_t_data_get(swigCPtr);
System.Runtime.InteropServices.Marshal.Copy(data, ret, 0, (int)this.length);
return ret;
}
}
public uint length {
set {
icsneocsharpPINVOKE.neomessage_t_length_set(swigCPtr, value);
}
get {
uint ret = icsneocsharpPINVOKE.neomessage_t_length_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_unsigned_char header {
set {
icsneocsharpPINVOKE.neomessage_t_header_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_t_header_get(swigCPtr);
SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
return ret;
}
}
public ushort netid {
set {
icsneocsharpPINVOKE.neomessage_t_netid_set(swigCPtr, value);
}
get {
ushort ret = icsneocsharpPINVOKE.neomessage_t_netid_get(swigCPtr);
return ret;
}
}
public byte type {
set {
icsneocsharpPINVOKE.neomessage_t_type_set(swigCPtr, value);
}
get {
byte ret = icsneocsharpPINVOKE.neomessage_t_type_get(swigCPtr);
return ret;
}
}
public SWIGTYPE_p_unsigned_char reserved {
set {
icsneocsharpPINVOKE.neomessage_t_reserved_set(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(value));
}
get {
global::System.IntPtr cPtr = icsneocsharpPINVOKE.neomessage_t_reserved_get(swigCPtr);
SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
return ret;
}
}
public neomessage_t() : this(icsneocsharpPINVOKE.new_neomessage_t(), true) {
}
}

View File

@ -1,119 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.0
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
public class neoversion_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal neoversion_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(neoversion_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~neoversion_t() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneocsharpPINVOKE.delete_neoversion_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public ushort major {
set {
icsneocsharpPINVOKE.neoversion_t_major_set(swigCPtr, value);
}
get {
ushort ret = icsneocsharpPINVOKE.neoversion_t_major_get(swigCPtr);
return ret;
}
}
public ushort minor {
set {
icsneocsharpPINVOKE.neoversion_t_minor_set(swigCPtr, value);
}
get {
ushort ret = icsneocsharpPINVOKE.neoversion_t_minor_get(swigCPtr);
return ret;
}
}
public ushort patch {
set {
icsneocsharpPINVOKE.neoversion_t_patch_set(swigCPtr, value);
}
get {
ushort ret = icsneocsharpPINVOKE.neoversion_t_patch_get(swigCPtr);
return ret;
}
}
public string metadata {
set {
icsneocsharpPINVOKE.neoversion_t_metadata_set(swigCPtr, value);
}
get {
string ret = icsneocsharpPINVOKE.neoversion_t_metadata_get(swigCPtr);
return ret;
}
}
public string buildBranch {
set {
icsneocsharpPINVOKE.neoversion_t_buildBranch_set(swigCPtr, value);
}
get {
string ret = icsneocsharpPINVOKE.neoversion_t_buildBranch_get(swigCPtr);
return ret;
}
}
public string buildTag {
set {
icsneocsharpPINVOKE.neoversion_t_buildTag_set(swigCPtr, value);
}
get {
string ret = icsneocsharpPINVOKE.neoversion_t_buildTag_get(swigCPtr);
return ret;
}
}
public string reserved {
set {
icsneocsharpPINVOKE.neoversion_t_reserved_set(swigCPtr, value);
}
get {
string ret = icsneocsharpPINVOKE.neoversion_t_reserved_get(swigCPtr);
return ret;
}
}
public neoversion_t() : this(icsneocsharpPINVOKE.new_neoversion_t(), true) {
}
}

View File

@ -1,13 +0,0 @@
cmake_minimum_required(VERSION 3.2)
project(icsneojava VERSION 0.2.0)
find_package(Java REQUIRED)
find_package(JNI REQUIRED)
include(UseJava)
include_directories(${JNI_INCLUDE_DIRS})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../third-party/libicsneo ${CMAKE_CURRENT_BINARY_DIR}/third-party/libicsneo)
add_library(icsneojava SHARED ${CMAKE_CURRENT_SOURCE_DIR}/java_wrap.c)
target_link_libraries(icsneojava icsneoc)

View File

@ -1,91 +0,0 @@
# libicsneo Java Example
This is an example console application which uses icsneojava to connect to an Intrepid Control Systems hardware device. It has both interactive and simple examples for sending and receiving CAN & CAN FD traffic.
## Cloning
This will create a copy of the repository on your local machine.
Run:
```shell
git clone https://github.com/intrepidcs/libicsneo-examples -b v0.2.0-dev --recursive
```
Alternatively, if you cloned without the `--recursive flag`, you must enter the `libicsneo-examples` folder and run the following:
```shell
git submodule update --recursive --init
```
If you haven't done this, `third-party/libicsneo` will be empty and you won't be able to build!
## Windows
### Building the DLL's
#### icsneoc
First, we are going to build the icsneoc library into a .dll file that is used by the Java wrapper to access the library functions.
1. Change directories to the `libicsneo-examples/third-party/libicsneo` folder.
2. Create a build directory by running `mkdir -p build`
3. Enter the build directory with `cd build`
4. Run `cmake ..` to generate your Makefile.
* Hint! Running `cmake -DCMAKE_BUILD_TYPE=Debug ..` will generate the proper scripts to build debug, and `cmake -DCMAKE_BUILD_TYPE=Release ..` will generate the proper scripts to build with all optimizations on.
5. Run `cmake --build .` to build the library.
* Hint! Speed up your build by using multiple processors! Use `make -j#` where `#` is the number of cores/threads your system has plus one. For instance, on a standard 8 thread Intel i7, you might use `-j9` for an ~8x speedup.
6. The `icsneoc.dll` file will be generated in `libicsneo-examples/third-party/libicsneo/build/Debug`. Move this file to the `/C/Windows/System32` folder.
#### icsneojava
Next, we are going to build the wrapper functions into a .dll file that is used to access the library functions in Java.
1. Change directories to the `libicsneo-examples/libicsneojava-example` folder.
2. Create a build directory by running `mkdir -p build`
3. Enter the build directory with `cd build`
4. Run `cmake ..` to generate your Makefile.
* Hint! Running `cmake -DCMAKE_BUILD_TYPE=Debug ..` will generate the proper scripts to build debug, and `cmake -DCMAKE_BUILD_TYPE=Release ..` will generate the proper scripts to build with all optimizations on.
5. Run `cmake --build .` to build the library.
* Hint! Speed up your build by using multiple processors! Use `make -j#` where `#` is the number of cores/threads your system has plus one. For instance, on a standard 8 thread Intel i7, you might use `-j9` for an ~8x speedup.
6. The `icsneojava.dll` file will be generated in `libicsneo-examples/libicsneojava-example/build/Debug`. Move this file to the `/C/Windows/System32` folder.
### Building and running the example program
1. Change directories to the `libicsneo-examples/libicsneojava-example/src` folder.
2. Run `javac Run.java`
3. Run `java Run`
## Ubuntu 18.04 LTS
### Building the .so's
#### icsneoc
1. Install dependencies with `sudo apt update` then `sudo apt install build-essential cmake libusb-1.0-0-dev libpcap0.8-dev`
2. Change directories to `libicsneo-examples/third-party/libicsneo` and create a build directory by running `mkdir -p build`
3. Enter the build directory with `cd build`
4. Run `cmake ..` to generate your Makefile.
* Hint! Running `cmake -DCMAKE_BUILD_TYPE=Debug ..` will generate the proper scripts to build debug, and `cmake -DCMAKE_BUILD_TYPE=Release ..` will generate the proper scripts to build with all optimizations on.
5. Run `make` to build the library.
* Hint! Speed up your build by using multiple processors! Use `make -j#` where `#` is the number of cores/threads your system has plus one. For instance, on a standard 8 thread Intel i7, you might use `-j9` for an ~8x speedup.
6. Run `sudo cp libicsneoc.so /usr/lib` so that it can be found via the default ubuntu .so search path. For more information, see the [ld.so.8 man page](http://man7.org/linux/man-pages/man8/ld.so.8.html).
#### icsneojava
Next, we are going to build the wrapper functions into a .so file that is used to access the library functions in Java.
1. Change directories to the `libicsneo-examples/libicsneojava-example` folder.
2. Create a build directory by running `mkdir -p build`
3. Enter the build directory with `cd build`
4. Run `cmake ..` to generate your Makefile.
* Hint! Running `cmake -DCMAKE_BUILD_TYPE=Debug ..` will generate the proper scripts to build debug, and `cmake -DCMAKE_BUILD_TYPE=Release ..` will generate the proper scripts to build with all optimizations on.
5. Run `cmake --build .` to build the library.
* Hint! Speed up your build by using multiple processors! Use `make -j#` where `#` is the number of cores/threads your system has plus one. For instance, on a standard 8 thread Intel i7, you might use `-j9` for an ~8x speedup.
6. The `icsneojava.so` file will be generated in `libicsneo-examples/libicsneojava-example/build/Debug`. Run `sudo cp libicsneojava.so /usr/lib` so that it can be found via the default ubuntu .so search path. For more information, see the [ld.so.8 man page](http://man7.org/linux/man-pages/man8/ld.so.8.html).
### Building and running the example program
1. Change directories to the `libicsneo-examples/libicsneojava-example/src` folder.
2. Run `javac Run.java`
3. Run `java Run`

View File

@ -1,125 +0,0 @@
%module icsneojava
%include <windows.i>
%include <typemaps.i>
%include <stdint.i>
%include <carrays.i>
%include <various.i>
%include <java.i>
%include <arrays_java.i>
#define DLLExport
%typemap(jni) uint8_t const *data "jbyteArray"
%typemap(jtype) uint8_t const *data "byte[]"
%typemap(jstype) uint8_t const *data "byte[]"
%typemap(javain) uint8_t const *data "$javainput"
%typemap(javaout) uint8_t const *data {
return $jnicall;
}
%typemap(out) uint8_t const *data %{
$result = (*jenv)->NewByteArray(jenv, (int) arg1->length);
(*jenv)->SetByteArrayRegion(jenv, $result, 0, (int) arg1->length, $1);
%}
%typemap(in) uint8_t const *data %{
bool isCopy;
arg2 = (*jenv)->GetByteArrayElements(jenv, jarg2, &isCopy);
%}
%typemap(jni) char *str "jobject"
%typemap(jtype) char *str "StringBuffer"
%typemap(jstype) char *str "StringBuffer"
/* How to convert Java(JNI) type to requested C type */
%typemap(in) char *str {
$1 = NULL;
if($input != NULL) {
/* Get the String from the StringBuffer */
jmethodID setLengthID;
jclass strClass = (*jenv)->GetObjectClass(jenv, $input);
jmethodID toStringID = (*jenv)->GetMethodID(jenv, strClass, "toString", "()Ljava/lang/String;");
jstring js = (jstring) (*jenv)->CallObjectMethod(jenv, $input, toStringID);
/* Convert the String to a C string */
const char *pCharStr = (*jenv)->GetStringUTFChars(jenv, js, 0);
/* Take a copy of the C string as the typemap is for a non const C string */
jmethodID capacityID = (*jenv)->GetMethodID(jenv, strClass, "capacity", "()I");
jint capacity = (*jenv)->CallIntMethod(jenv, $input, capacityID);
$1 = (char *) malloc(capacity+1);
strcpy($1, pCharStr);
/* Release the UTF string we obtained with GetStringUTFChars */
(*jenv)->ReleaseStringUTFChars(jenv, js, pCharStr);
/* Zero the original StringBuffer, so we can replace it with the result */
setLengthID = (*jenv)->GetMethodID(jenv, strClass, "setLength", "(I)V");
(*jenv)->CallVoidMethod(jenv, $input, setLengthID, (jint) 0);
}
}
/* How to convert the C type to the Java(JNI) type */
%typemap(argout) char *str {
if($1 != NULL) {
/* Append the result to the empty StringBuffer */
jstring newString = (*jenv)->NewStringUTF(jenv, $1);
jclass strClass = (*jenv)->GetObjectClass(jenv, $input);
jmethodID appendStringID = (*jenv)->GetMethodID(jenv, strClass, "append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;");
(*jenv)->CallObjectMethod(jenv, $input, appendStringID, newString);
/* Clean up the string object, no longer needed */
free($1);
$1 = NULL;
}
}
/* Prevent the default freearg typemap from being used */
%typemap(freearg) char *str ""
/* Convert the jstype to jtype typemap type */
%typemap(javain) char *str "$javainput"
%{
#include "icsneo/icsneoc.h"
%}
%apply int *INOUT {size_t *};
%ignore icsneo_addMessageCallback;
%ignore icsneo_removeMessageCallback;
%ignore icsneo_addEventCallback;
%ignore icsneo_removeEventCallback;
%include "icsneo/icsneoc.h"
%include "icsneo/device/neodevice.h"
%include "icsneo/communication/message/neomessage.h"
%include "icsneo/device/devicetype.h"
%include "icsneo/api/version.h"
%include "icsneo/api/event.h"
%include "icsneo/communication/network.h"
%inline %{
static neomessage_can_t* neomessage_can_t_cast(neomessage_t* msg) {
return (neomessage_can_t*) msg;
}
static neomessage_eth_t* neomessage_eth_t_cast(neomessage_t* msg) {
return (neomessage_eth_t*) msg;
}
static neomessage_t* from_can_neomessage_t_cast(neomessage_can_t* msg) {
return (neomessage_t*) msg;
}
static neomessage_t* from_eth_neomessage_t_cast(neomessage_eth_t* msg) {
return (neomessage_t*) msg;
}
%}
%array_functions(neodevice_t, neodevice_t_array);
%array_functions(neoevent_t, neoevent_t_array);
%array_functions(neomessage_t, neomessage_t_array);

File diff suppressed because it is too large Load Diff

View File

@ -1,511 +0,0 @@
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
public class InteractiveExample {
private int msgLimit = 50000;
private neodevice_t selectedDevice;
private ArrayList<neodevice_t> devices = new ArrayList<neodevice_t>();
private int numDevices = 0;
private void printAllDevices() {
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.");
}
for(int i = 0; i < numDevices; i++) {
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
if(icsneojava.icsneo_describeDevice(devices.get(i), description, maxLength)) {
System.out.print("[" + (i + 1) + "] " + description + "\tConnected: ");
if(icsneojava.icsneo_isOpen(devices.get(i))) {
System.out.print("Yes\t");
} else System.out.print("No\t");
System.out.print("Online: ");
if(icsneojava.icsneo_isOnline(devices.get(i))) {
System.out.print("Yes\t");
} else System.out.print("No\t");
System.out.print("Msg Polling: ");
if(icsneojava.icsneo_isMessagePollingEnabled(devices.get(i))) {
System.out.print("On\n");
} else System.out.print("Off\n");
} else {
System.out.println("Description for device " + (i + 1) + " not available!");
}
}
}
private int scanNewDevices() {
neodevice_t newDevices = icsneojava.new_neodevice_t_array(99);
int[] count = {10};
icsneojava.icsneo_findAllDevices(newDevices, count);
numDevices += count[0];
for(int i = 0; i < numDevices; i++) {
devices.add(icsneojava.neodevice_t_array_getitem(newDevices, i));
}
icsneojava.delete_neodevice_t_array(newDevices);
return count[0];
}
private void printMainMenu() {
System.out.println("Press the letter next to the function you want to use:");
System.out.println("A - List all devices");
System.out.println("B - Scan for new devices");
System.out.println("C - Open/close");
System.out.println("D - Go online/offline");
System.out.println("E - Enable/disable message polling");
System.out.println("F - Get messages");
System.out.println("G - Send message");
System.out.println("H - Get events");
System.out.println("I - Set HS CAN to 250K");
System.out.println("J - Set HS CAN to 500K");
System.out.println("X - Exit");
}
private void printLastError() {
neoevent_t error = new neoevent_t();
if(icsneojava.icsneo_getLastError(error))
System.out.println("Error 0x" + error.getEventNumber() + ": " + error.getDescription());
else
System.out.println("No errors found!");
}
private void printAPIEvents() {
neoevent_t events = icsneojava.new_neoevent_t_array(99);
int[] eventCount = {99};
if(icsneojava.icsneo_getEvents(events, eventCount)) {
if(eventCount[0] == 1) {
neoevent_t evt = icsneojava.neoevent_t_array_getitem(events, 0);
System.out.println("1 API event found!");
System.out.println("Event 0x" + evt.getEventNumber() + ": " + evt.getDescription());
} else {
System.out.println(eventCount[0] + " API events found!");
for(var i = 0; i < eventCount[0]; ++i) {
neoevent_t evt = icsneojava.neoevent_t_array_getitem(events, i);
System.out.println("Event 0x" + evt.getEventNumber() + ": " + evt.getDescription());
}
}
} else {
System.out.println("Failed to get API events!");
}
icsneojava.delete_neoevent_t_array(events);
}
private void printDeviceEvents(neodevice_t device) {
neoevent_t events = icsneojava.new_neoevent_t_array(99);
int[] eventCount = {99};
if(icsneojava.icsneo_getDeviceEvents(device, events, eventCount)) {
if(eventCount[0] == 1) {
neoevent_t evt = icsneojava.neoevent_t_array_getitem(events, 0);
System.out.println("1 device event found!");
System.out.println("Event 0x" + evt.getEventNumber() + ": " + evt.getDescription());
} else {
System.out.println(eventCount[0] + " device events found!");
for(int i = 0; i < eventCount[0]; ++i) {
neoevent_t evt = icsneojava.neoevent_t_array_getitem(events, i);
System.out.println("Event 0x" + evt.getEventNumber() + ": " + evt.getDescription());
}
}
} else {
System.out.println("Failed to get API events!");
}
icsneojava.delete_neoevent_t_array(events);
}
private char getCharInput(char[] allowed) {
boolean found = false;
char key = '0';
Scanner sc = new Scanner(System.in);
while(!found) {
key = sc.next().charAt(0);
System.out.println();
for(char compare : allowed) {
if(compare == key) {
found = true;
break;
}
}
if(!found) {
System.out.println("Input did not match expected options. Please try again.");
}
}
return key;
}
private neodevice_t selectDevice() {
System.out.println("Please select a device:");
printAllDevices();
System.out.println();
int selectedDeviceNum = 10;
while(selectedDeviceNum > numDevices) {
char deviceSelection = getCharInput(new char[] { '1', '2', '3', '4', '5', '6', '7', '8', '9' });
selectedDeviceNum = deviceSelection - '0';
if(selectedDeviceNum > numDevices) {
System.out.println("Selected device out of range!");
}
}
System.out.println();
return devices.get(selectedDeviceNum - 1);
}
public void run() {
neoversion_t version = icsneojava.icsneo_getVersion();
System.out.println("ICS libicsneojava.dll version " + version.getMajor() + "." + version.getMinor() + "." + version.getPatch());
System.out.println();
while(true) {
printMainMenu();
System.out.println();
char input = getCharInput(new char[] { 'A', 'a', 'B', 'b', 'C', 'c', 'D', 'd', 'E', 'e', 'F', 'f', 'G', 'g', 'H', 'h', 'I', 'i', 'J', 'j', 'X', 'x' });
System.out.println();
switch(input) {
// List current devices
case 'A':
case 'a':
printAllDevices();
System.out.println();
break;
// Scan for new devices
case 'B':
case 'b': {
var numNewDevices = scanNewDevices();
if(numNewDevices == 1) {
System.out.println("1 new device found!");
} else {
System.out.println(numNewDevices + " new devices found!");
}
printAllDevices();
System.out.println();
break;
}
// Open/close a device
case 'C':
case 'c': {
// Select a device and get its description
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = selectDevice();
// Get the product description for the device
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
icsneojava.icsneo_describeDevice(selectedDevice, description, maxLength);
System.out.println("Would you like to open or close " + description + "?");
System.out.println("[1] Open\n[2] Close\n[3] Cancel\n");
char option = getCharInput(new char[] { '1', '2', '3' });
System.out.println();
switch(option) {
case '1':
// Attempt to open the selected device
if(icsneojava.icsneo_openDevice(selectedDevice)) {
System.out.println(description + " successfully opened!\n");
} else {
System.out.println(description + " failed to open!\n");
printLastError();
System.out.println();
}
break;
case '2':
// Attempt to close the device
if(icsneojava.icsneo_closeDevice(selectedDevice)) {
numDevices--;
System.out.println("Successfully closed " + description + "!\n");
devices.remove(selectedDevice);
selectedDevice = null;
} else {
System.out.println("Failed to close " + description + "!\n");
printLastError();
System.out.println();
}
break;
default:
System.out.println("Canceling!\n");
break;
}
break;
}
// Go online/offline
case 'D':
case 'd': {
// Select a device and get its description
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = selectDevice();
// Get the product description for the device
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
icsneojava.icsneo_describeDevice(selectedDevice, description, maxLength);
System.out.println("Would you like to have " + description + " go online or offline?");
System.out.println("[1] Online\n[2] Offline\n[3] Cancel\n");
char option = getCharInput(new char[] { '1', '2', '3' });
System.out.println();
switch(option) {
case '1':
// Attempt to go online
if(icsneojava.icsneo_goOnline(selectedDevice)) {
System.out.println(description + " successfully went online!\n");
} else {
System.out.println(description + " failed to go online!\n");
printLastError();
System.out.println();
}
break;
case '2':
// Attempt to go offline
if(icsneojava.icsneo_goOffline(selectedDevice)) {
System.out.println(description + " successfully went offline!\n");
} else {
System.out.println(description + " failed to go offline!\n");
printLastError();
System.out.println();
}
break;
default:
System.out.println("Canceling!\n");
break;
}
break;
}
// Enable/disable message polling
case 'E':
case 'e': {
// Select a device and get its description
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = selectDevice();
// Get the product description for the device
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
icsneojava.icsneo_describeDevice(selectedDevice, description, maxLength);
System.out.println("Would you like to enable or disable message polling for " + description + "?");
System.out.println("[1] Enable\n[2] Disable\n[3] Cancel\n");
char option = getCharInput(new char[] { '1', '2', '3' });
System.out.println();
switch(option) {
case '1':
// Attempt to enable message polling
if(icsneojava.icsneo_enableMessagePolling(selectedDevice)) {
System.out.println("Successfully enabled message polling for " + description + "!\n");
} else {
System.out.println("Failed to enable message polling for " + description + "!\n");
printLastError();
System.out.println();
}
// Manually setting the polling message limit as done below is optional
// It will default to 20k if not set
// Attempt to set the polling message limit
if(icsneojava.icsneo_setPollingMessageLimit(selectedDevice, msgLimit)) {
System.out.println("Successfully set message polling limit for " + description + "!\n");
} else {
System.out.println("Failed to set polling message limit for " + description + "!\n");
printLastError();
System.out.println();
}
break;
case '2':
// Attempt to disable message polling
if(icsneojava.icsneo_disableMessagePolling(selectedDevice)) {
System.out.println("Successfully disabled message polling for " + description + "!\n");
} else {
System.out.println("Failed to disable message polling for " + description + "!\n");
printLastError();
System.out.println();
}
break;
default:
System.out.println("Canceling!\n");
break;
}
}
break;
case 'F':
case 'f': {
// Select a device and get its description
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = selectDevice();
// Get the product description for the device
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
icsneojava.icsneo_describeDevice(selectedDevice, description, maxLength);
// Prepare the neomessage_t array and size for reading in the messages
neomessage_t msgs = icsneojava.new_neomessage_t_array((int)msgLimit);
int[] msgCount = {msgLimit};
if(!icsneojava.icsneo_getMessages(selectedDevice, msgs, msgCount, BigInteger.ZERO)) {
System.out.println("Failed to get messages for " + description + "!\n");
icsneojava.delete_neomessage_t_array(msgs);
printLastError();
System.out.println();
break;
}
if(msgCount[0] == 1) {
System.out.println("1 message received from " + description + "!");
} else {
System.out.println(msgCount[0] + " messages received from " + description + "!");
}
// Print out the received messages
for(int i = 0; i < msgCount[0]; i++) {
neomessage_t msg = icsneojava.neomessage_t_array_getitem(msgs, i);
if(msg.getType() == icsneojava.ICSNEO_NETWORK_TYPE_CAN) {
System.out.print("\t0x" + String.format("%03x", icsneojava.neomessage_can_t_cast(msg).getArbid()) + " [" + msg.getLength() + "] ");
for(int j = 0; j < msg.getLength(); j++) {
System.out.print(String.format("%02x ", icsneojava.neomessage_can_t_cast(msg).getData()[j]));
}
System.out.println("(" + msg.getTimestamp() + ")");
} else {
if(msg.getNetid() != 0)
System.out.println("\tMessage on netid " + msg.getNetid() + " with length " + msg.getLength());
}
}
icsneojava.delete_neomessage_t_array(msgs);
break;
}
// Send message
case 'G':
case 'g': {
// Select a device and get its description
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = selectDevice();
// Get the product description for the device
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
icsneojava.icsneo_describeDevice(selectedDevice, description, maxLength);
// Start generating sample msg
neomessage_can_t msg = new neomessage_can_t();
msg.setArbid(0x120);
msg.setLength(6);
msg.setNetid(icsneojava.ICSNEO_NETID_HSCAN);
msg.setData(new byte[] { (byte) 0xaa, (byte) 0xbb, (byte) 0xcc, (byte) 0xdd, (byte) 0xee, (byte) 0xff});
msg.getStatus().setCanfdFDF(0);
msg.getStatus().setExtendedFrame(0);
msg.getStatus().setCanfdBRS(0);
// End generating sample msg
// Attempt to transmit the sample msg
if(icsneojava.icsneo_transmit(selectedDevice, icsneojava.from_can_neomessage_t_cast(msg))) {
System.out.println("Message transmit successful!");
} else {
System.out.println("Failed to transmit message to " + description + "!\n");
printLastError();
System.out.println();
}
break;
}
// Get events
case 'H':
case 'h':
printAPIEvents();
System.out.println();
break;
// Set HS CAN to 250k
case 'I':
case 'i': {
// Select a device and get its description
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = selectDevice();
// Get the product description for the device
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
icsneojava.icsneo_describeDevice(selectedDevice, description, maxLength);
// Attempt to set baudrate and apply settings
if(icsneojava.icsneo_setBaudrate(selectedDevice, icsneojava.ICSNEO_NETID_HSCAN, 250000) && icsneojava.icsneo_settingsApply(selectedDevice)) {
System.out.println("Successfully set HS CAN baudrate for " + description + "to 250k!\n");
} else {
System.out.println("Failed to set HS CAN for " + description + " to 250k!\n");
printLastError();
System.out.println();
}
break;
}
// Set HS CAN to 500k
case 'J':
case 'j': {
// Select a device and get its description
if(numDevices == 0) {
System.out.println("No devices found! Please scan for new devices.\n");
break;
}
selectedDevice = selectDevice();
// Get the product description for the device
StringBuffer description = new StringBuffer(icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION);
int[] maxLength = {icsneojava.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION};
icsneojava.icsneo_describeDevice(selectedDevice, description, maxLength);
// Attempt to set baudrate and apply settings
if(icsneojava.icsneo_setBaudrate(selectedDevice, icsneojava.ICSNEO_NETID_HSCAN, 500000) && icsneojava.icsneo_settingsApply(selectedDevice)) {
System.out.println("Successfully set HS CAN baudrate for " + description + "to 500k!\n");
} else {
System.out.println("Failed to set HS CAN for " + description + " to 500k!\n");
printLastError();
System.out.println();
}
break;
}
case 'X':
case 'x':
System.out.println("Exiting program");
return;
default:
System.out.println("Unexpected input, exiting!");
return;
}
}
}
}

View File

@ -1,10 +0,0 @@
public class Run {
static {
System.loadLibrary("icsneojava");
}
public static void main(String[] args) {
InteractiveExample example = new InteractiveExample();
example.run();
}
}

View File

@ -1,25 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class SWIGTYPE_p_time_t {
private transient long swigCPtr;
protected SWIGTYPE_p_time_t(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_time_t() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_time_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}

View File

@ -1,25 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class SWIGTYPE_p_unsigned_char {
private transient long swigCPtr;
protected SWIGTYPE_p_unsigned_char(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_unsigned_char() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_unsigned_char obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}

View File

@ -1,25 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class SWIGTYPE_p_unsigned_int {
private transient long swigCPtr;
protected SWIGTYPE_p_unsigned_int(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_unsigned_int() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_unsigned_int obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}

View File

@ -1,25 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class SWIGTYPE_p_unsigned_short {
private transient long swigCPtr;
protected SWIGTYPE_p_unsigned_short(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_unsigned_short() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_unsigned_short obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}

View File

@ -1,25 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class SWIGTYPE_p_void {
private transient long swigCPtr;
protected SWIGTYPE_p_void(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_void() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_void obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}

View File

@ -1,262 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class icsneojava implements icsneojavaConstants {
public static void icsneo_findAllDevices(neodevice_t devices, int[] count) {
icsneojavaJNI.icsneo_findAllDevices(neodevice_t.getCPtr(devices), devices, count);
}
public static void icsneo_freeUnconnectedDevices() {
icsneojavaJNI.icsneo_freeUnconnectedDevices();
}
public static boolean icsneo_serialNumToString(long num, StringBuffer str, int[] count) {
return icsneojavaJNI.icsneo_serialNumToString(num, str, count);
}
public static long icsneo_serialStringToNum(StringBuffer str) {
return icsneojavaJNI.icsneo_serialStringToNum(str);
}
public static boolean icsneo_isValidNeoDevice(neodevice_t device) {
return icsneojavaJNI.icsneo_isValidNeoDevice(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_openDevice(neodevice_t device) {
return icsneojavaJNI.icsneo_openDevice(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_closeDevice(neodevice_t device) {
return icsneojavaJNI.icsneo_closeDevice(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_isOpen(neodevice_t device) {
return icsneojavaJNI.icsneo_isOpen(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_goOnline(neodevice_t device) {
return icsneojavaJNI.icsneo_goOnline(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_goOffline(neodevice_t device) {
return icsneojavaJNI.icsneo_goOffline(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_isOnline(neodevice_t device) {
return icsneojavaJNI.icsneo_isOnline(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_enableMessagePolling(neodevice_t device) {
return icsneojavaJNI.icsneo_enableMessagePolling(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_disableMessagePolling(neodevice_t device) {
return icsneojavaJNI.icsneo_disableMessagePolling(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_isMessagePollingEnabled(neodevice_t device) {
return icsneojavaJNI.icsneo_isMessagePollingEnabled(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_getMessages(neodevice_t device, neomessage_t messages, int[] items, java.math.BigInteger timeout) {
return icsneojavaJNI.icsneo_getMessages(neodevice_t.getCPtr(device), device, neomessage_t.getCPtr(messages), messages, items, timeout);
}
public static long icsneo_getPollingMessageLimit(neodevice_t device) {
return icsneojavaJNI.icsneo_getPollingMessageLimit(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_setPollingMessageLimit(neodevice_t device, long newLimit) {
return icsneojavaJNI.icsneo_setPollingMessageLimit(neodevice_t.getCPtr(device), device, newLimit);
}
public static boolean icsneo_getProductName(neodevice_t device, StringBuffer str, int[] maxLength) {
return icsneojavaJNI.icsneo_getProductName(neodevice_t.getCPtr(device), device, str, maxLength);
}
public static boolean icsneo_getProductNameForType(long type, StringBuffer str, int[] maxLength) {
return icsneojavaJNI.icsneo_getProductNameForType(type, str, maxLength);
}
public static boolean icsneo_settingsRefresh(neodevice_t device) {
return icsneojavaJNI.icsneo_settingsRefresh(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_settingsApply(neodevice_t device) {
return icsneojavaJNI.icsneo_settingsApply(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_settingsApplyTemporary(neodevice_t device) {
return icsneojavaJNI.icsneo_settingsApplyTemporary(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_settingsApplyDefaults(neodevice_t device) {
return icsneojavaJNI.icsneo_settingsApplyDefaults(neodevice_t.getCPtr(device), device);
}
public static boolean icsneo_settingsApplyDefaultsTemporary(neodevice_t device) {
return icsneojavaJNI.icsneo_settingsApplyDefaultsTemporary(neodevice_t.getCPtr(device), device);
}
public static int icsneo_settingsReadStructure(neodevice_t device, SWIGTYPE_p_void structure, long structureSize) {
return icsneojavaJNI.icsneo_settingsReadStructure(neodevice_t.getCPtr(device), device, SWIGTYPE_p_void.getCPtr(structure), structureSize);
}
public static boolean icsneo_settingsApplyStructure(neodevice_t device, SWIGTYPE_p_void structure, long structureSize) {
return icsneojavaJNI.icsneo_settingsApplyStructure(neodevice_t.getCPtr(device), device, SWIGTYPE_p_void.getCPtr(structure), structureSize);
}
public static boolean icsneo_settingsApplyStructureTemporary(neodevice_t device, SWIGTYPE_p_void structure, long structureSize) {
return icsneojavaJNI.icsneo_settingsApplyStructureTemporary(neodevice_t.getCPtr(device), device, SWIGTYPE_p_void.getCPtr(structure), structureSize);
}
public static long icsneo_getBaudrate(neodevice_t device, int netid) {
return icsneojavaJNI.icsneo_getBaudrate(neodevice_t.getCPtr(device), device, netid);
}
public static boolean icsneo_setBaudrate(neodevice_t device, int netid, long newBaudrate) {
return icsneojavaJNI.icsneo_setBaudrate(neodevice_t.getCPtr(device), device, netid, newBaudrate);
}
public static long icsneo_getFDBaudrate(neodevice_t device, int netid) {
return icsneojavaJNI.icsneo_getFDBaudrate(neodevice_t.getCPtr(device), device, netid);
}
public static boolean icsneo_setFDBaudrate(neodevice_t device, int netid, long newBaudrate) {
return icsneojavaJNI.icsneo_setFDBaudrate(neodevice_t.getCPtr(device), device, netid, newBaudrate);
}
public static boolean icsneo_transmit(neodevice_t device, neomessage_t message) {
return icsneojavaJNI.icsneo_transmit(neodevice_t.getCPtr(device), device, neomessage_t.getCPtr(message), message);
}
public static boolean icsneo_transmitMessages(neodevice_t device, neomessage_t messages, long count) {
return icsneojavaJNI.icsneo_transmitMessages(neodevice_t.getCPtr(device), device, neomessage_t.getCPtr(messages), messages, count);
}
public static void icsneo_setWriteBlocks(neodevice_t device, boolean blocks) {
icsneojavaJNI.icsneo_setWriteBlocks(neodevice_t.getCPtr(device), device, blocks);
}
public static boolean icsneo_describeDevice(neodevice_t device, StringBuffer str, int[] maxLength) {
return icsneojavaJNI.icsneo_describeDevice(neodevice_t.getCPtr(device), device, str, maxLength);
}
public static neoversion_t icsneo_getVersion() {
return new neoversion_t(icsneojavaJNI.icsneo_getVersion(), true);
}
public static boolean icsneo_getEvents(neoevent_t events, int[] size) {
return icsneojavaJNI.icsneo_getEvents(neoevent_t.getCPtr(events), events, size);
}
public static boolean icsneo_getDeviceEvents(neodevice_t device, neoevent_t events, int[] size) {
return icsneojavaJNI.icsneo_getDeviceEvents(neodevice_t.getCPtr(device), device, neoevent_t.getCPtr(events), events, size);
}
public static boolean icsneo_getLastError(neoevent_t error) {
return icsneojavaJNI.icsneo_getLastError(neoevent_t.getCPtr(error), error);
}
public static void icsneo_discardAllEvents() {
icsneojavaJNI.icsneo_discardAllEvents();
}
public static void icsneo_discardDeviceEvents(neodevice_t device) {
icsneojavaJNI.icsneo_discardDeviceEvents(neodevice_t.getCPtr(device), device);
}
public static void icsneo_setEventLimit(long newLimit) {
icsneojavaJNI.icsneo_setEventLimit(newLimit);
}
public static long icsneo_getEventLimit() {
return icsneojavaJNI.icsneo_getEventLimit();
}
public static boolean icsneo_getSupportedDevices(SWIGTYPE_p_unsigned_int devices, int[] count) {
return icsneojavaJNI.icsneo_getSupportedDevices(SWIGTYPE_p_unsigned_int.getCPtr(devices), count);
}
public static boolean icsneo_getTimestampResolution(neodevice_t device, SWIGTYPE_p_unsigned_short resolution) {
return icsneojavaJNI.icsneo_getTimestampResolution(neodevice_t.getCPtr(device), device, SWIGTYPE_p_unsigned_short.getCPtr(resolution));
}
public static neomessage_can_t neomessage_can_t_cast(neomessage_t msg) {
long cPtr = icsneojavaJNI.neomessage_can_t_cast(neomessage_t.getCPtr(msg), msg);
return (cPtr == 0) ? null : new neomessage_can_t(cPtr, false);
}
public static neomessage_eth_t neomessage_eth_t_cast(neomessage_t msg) {
long cPtr = icsneojavaJNI.neomessage_eth_t_cast(neomessage_t.getCPtr(msg), msg);
return (cPtr == 0) ? null : new neomessage_eth_t(cPtr, false);
}
public static neomessage_t from_can_neomessage_t_cast(neomessage_can_t msg) {
long cPtr = icsneojavaJNI.from_can_neomessage_t_cast(neomessage_can_t.getCPtr(msg), msg);
return (cPtr == 0) ? null : new neomessage_t(cPtr, false);
}
public static neomessage_t from_eth_neomessage_t_cast(neomessage_eth_t msg) {
long cPtr = icsneojavaJNI.from_eth_neomessage_t_cast(neomessage_eth_t.getCPtr(msg), msg);
return (cPtr == 0) ? null : new neomessage_t(cPtr, false);
}
public static neodevice_t new_neodevice_t_array(int nelements) {
long cPtr = icsneojavaJNI.new_neodevice_t_array(nelements);
return (cPtr == 0) ? null : new neodevice_t(cPtr, false);
}
public static void delete_neodevice_t_array(neodevice_t ary) {
icsneojavaJNI.delete_neodevice_t_array(neodevice_t.getCPtr(ary), ary);
}
public static neodevice_t neodevice_t_array_getitem(neodevice_t ary, int index) {
return new neodevice_t(icsneojavaJNI.neodevice_t_array_getitem(neodevice_t.getCPtr(ary), ary, index), true);
}
public static void neodevice_t_array_setitem(neodevice_t ary, int index, neodevice_t value) {
icsneojavaJNI.neodevice_t_array_setitem(neodevice_t.getCPtr(ary), ary, index, neodevice_t.getCPtr(value), value);
}
public static neoevent_t new_neoevent_t_array(int nelements) {
long cPtr = icsneojavaJNI.new_neoevent_t_array(nelements);
return (cPtr == 0) ? null : new neoevent_t(cPtr, false);
}
public static void delete_neoevent_t_array(neoevent_t ary) {
icsneojavaJNI.delete_neoevent_t_array(neoevent_t.getCPtr(ary), ary);
}
public static neoevent_t neoevent_t_array_getitem(neoevent_t ary, int index) {
return new neoevent_t(icsneojavaJNI.neoevent_t_array_getitem(neoevent_t.getCPtr(ary), ary, index), true);
}
public static void neoevent_t_array_setitem(neoevent_t ary, int index, neoevent_t value) {
icsneojavaJNI.neoevent_t_array_setitem(neoevent_t.getCPtr(ary), ary, index, neoevent_t.getCPtr(value), value);
}
public static neomessage_t new_neomessage_t_array(int nelements) {
long cPtr = icsneojavaJNI.new_neomessage_t_array(nelements);
return (cPtr == 0) ? null : new neomessage_t(cPtr, false);
}
public static void delete_neomessage_t_array(neomessage_t ary) {
icsneojavaJNI.delete_neomessage_t_array(neomessage_t.getCPtr(ary), ary);
}
public static neomessage_t neomessage_t_array_getitem(neomessage_t ary, int index) {
return new neomessage_t(icsneojavaJNI.neomessage_t_array_getitem(neomessage_t.getCPtr(ary), ary, index), true);
}
public static void neomessage_t_array_setitem(neomessage_t ary, int index, neomessage_t value) {
icsneojavaJNI.neomessage_t_array_setitem(neomessage_t.getCPtr(ary), ary, index, neomessage_t.getCPtr(value), value);
}
}

View File

@ -1,120 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public interface icsneojavaConstants {
public final static int ICSNEO_DEVICETYPE_LONGEST_NAME = icsneojavaJNI.ICSNEO_DEVICETYPE_LONGEST_NAME_get();
public final static int ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION = icsneojavaJNI.ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION_get();
public final static int ICSNEO_NETID_DEVICE = icsneojavaJNI.ICSNEO_NETID_DEVICE_get();
public final static int ICSNEO_NETID_HSCAN = icsneojavaJNI.ICSNEO_NETID_HSCAN_get();
public final static int ICSNEO_NETID_MSCAN = icsneojavaJNI.ICSNEO_NETID_MSCAN_get();
public final static int ICSNEO_NETID_SWCAN = icsneojavaJNI.ICSNEO_NETID_SWCAN_get();
public final static int ICSNEO_NETID_LSFTCAN = icsneojavaJNI.ICSNEO_NETID_LSFTCAN_get();
public final static int ICSNEO_NETID_FORDSCP = icsneojavaJNI.ICSNEO_NETID_FORDSCP_get();
public final static int ICSNEO_NETID_J1708 = icsneojavaJNI.ICSNEO_NETID_J1708_get();
public final static int ICSNEO_NETID_AUX = icsneojavaJNI.ICSNEO_NETID_AUX_get();
public final static int ICSNEO_NETID_J1850VPW = icsneojavaJNI.ICSNEO_NETID_J1850VPW_get();
public final static int ICSNEO_NETID_ISO = icsneojavaJNI.ICSNEO_NETID_ISO_get();
public final static int ICSNEO_NETID_MAIN51 = icsneojavaJNI.ICSNEO_NETID_MAIN51_get();
public final static int ICSNEO_NETID_RED = icsneojavaJNI.ICSNEO_NETID_RED_get();
public final static int ICSNEO_NETID_SCI = icsneojavaJNI.ICSNEO_NETID_SCI_get();
public final static int ICSNEO_NETID_ISO2 = icsneojavaJNI.ICSNEO_NETID_ISO2_get();
public final static int ICSNEO_NETID_ISO14230 = icsneojavaJNI.ICSNEO_NETID_ISO14230_get();
public final static int ICSNEO_NETID_LIN = icsneojavaJNI.ICSNEO_NETID_LIN_get();
public final static int ICSNEO_NETID_OP_ETHERNET1 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET1_get();
public final static int ICSNEO_NETID_OP_ETHERNET2 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET2_get();
public final static int ICSNEO_NETID_OP_ETHERNET3 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET3_get();
public final static int ICSNEO_NETID_RED_EXT_MEMORYREAD = icsneojavaJNI.ICSNEO_NETID_RED_EXT_MEMORYREAD_get();
public final static int ICSNEO_NETID_RED_INT_MEMORYREAD = icsneojavaJNI.ICSNEO_NETID_RED_INT_MEMORYREAD_get();
public final static int ICSNEO_NETID_RED_DFLASH_READ = icsneojavaJNI.ICSNEO_NETID_RED_DFLASH_READ_get();
public final static int ICSNEO_NETID_RED_SDCARD_READ = icsneojavaJNI.ICSNEO_NETID_RED_SDCARD_READ_get();
public final static int ICSNEO_NETID_CAN_ERRBITS = icsneojavaJNI.ICSNEO_NETID_CAN_ERRBITS_get();
public final static int ICSNEO_NETID_RED_DFLASH_WRITE_DONE = icsneojavaJNI.ICSNEO_NETID_RED_DFLASH_WRITE_DONE_get();
public final static int ICSNEO_NETID_RED_WAVE_CAN1_LOGICAL = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_CAN1_LOGICAL_get();
public final static int ICSNEO_NETID_RED_WAVE_CAN2_LOGICAL = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_CAN2_LOGICAL_get();
public final static int ICSNEO_NETID_RED_WAVE_LIN1_LOGICAL = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_LIN1_LOGICAL_get();
public final static int ICSNEO_NETID_RED_WAVE_LIN2_LOGICAL = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_LIN2_LOGICAL_get();
public final static int ICSNEO_NETID_RED_WAVE_LIN1_ANALOG = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_LIN1_ANALOG_get();
public final static int ICSNEO_NETID_RED_WAVE_LIN2_ANALOG = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_LIN2_ANALOG_get();
public final static int ICSNEO_NETID_RED_WAVE_MISC_ANALOG = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_MISC_ANALOG_get();
public final static int ICSNEO_NETID_RED_WAVE_MISCDIO2_LOGICAL = icsneojavaJNI.ICSNEO_NETID_RED_WAVE_MISCDIO2_LOGICAL_get();
public final static int ICSNEO_NETID_RED_NETWORK_COM_ENABLE_EX = icsneojavaJNI.ICSNEO_NETID_RED_NETWORK_COM_ENABLE_EX_get();
public final static int ICSNEO_NETID_RED_NEOVI_NETWORK = icsneojavaJNI.ICSNEO_NETID_RED_NEOVI_NETWORK_get();
public final static int ICSNEO_NETID_RED_READ_BAUD_SETTINGS = icsneojavaJNI.ICSNEO_NETID_RED_READ_BAUD_SETTINGS_get();
public final static int ICSNEO_NETID_RED_OLDFORMAT = icsneojavaJNI.ICSNEO_NETID_RED_OLDFORMAT_get();
public final static int ICSNEO_NETID_RED_SCOPE_CAPTURE = icsneojavaJNI.ICSNEO_NETID_RED_SCOPE_CAPTURE_get();
public final static int ICSNEO_NETID_RED_HARDWARE_EXCEP = icsneojavaJNI.ICSNEO_NETID_RED_HARDWARE_EXCEP_get();
public final static int ICSNEO_NETID_RED_GET_RTC = icsneojavaJNI.ICSNEO_NETID_RED_GET_RTC_get();
public final static int ICSNEO_NETID_ISO3 = icsneojavaJNI.ICSNEO_NETID_ISO3_get();
public final static int ICSNEO_NETID_HSCAN2 = icsneojavaJNI.ICSNEO_NETID_HSCAN2_get();
public final static int ICSNEO_NETID_HSCAN3 = icsneojavaJNI.ICSNEO_NETID_HSCAN3_get();
public final static int ICSNEO_NETID_OP_ETHERNET4 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET4_get();
public final static int ICSNEO_NETID_OP_ETHERNET5 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET5_get();
public final static int ICSNEO_NETID_ISO4 = icsneojavaJNI.ICSNEO_NETID_ISO4_get();
public final static int ICSNEO_NETID_LIN2 = icsneojavaJNI.ICSNEO_NETID_LIN2_get();
public final static int ICSNEO_NETID_LIN3 = icsneojavaJNI.ICSNEO_NETID_LIN3_get();
public final static int ICSNEO_NETID_LIN4 = icsneojavaJNI.ICSNEO_NETID_LIN4_get();
public final static int ICSNEO_NETID_RED_APP_ERROR = icsneojavaJNI.ICSNEO_NETID_RED_APP_ERROR_get();
public final static int ICSNEO_NETID_CGI = icsneojavaJNI.ICSNEO_NETID_CGI_get();
public final static int ICSNEO_NETID_RESET_STATUS = icsneojavaJNI.ICSNEO_NETID_RESET_STATUS_get();
public final static int ICSNEO_NETID_FB_STATUS = icsneojavaJNI.ICSNEO_NETID_FB_STATUS_get();
public final static int ICSNEO_NETID_APP_SIGNAL_STATUS = icsneojavaJNI.ICSNEO_NETID_APP_SIGNAL_STATUS_get();
public final static int ICSNEO_NETID_READ_DATALINK_CM_TX_MSG = icsneojavaJNI.ICSNEO_NETID_READ_DATALINK_CM_TX_MSG_get();
public final static int ICSNEO_NETID_READ_DATALINK_CM_RX_MSG = icsneojavaJNI.ICSNEO_NETID_READ_DATALINK_CM_RX_MSG_get();
public final static int ICSNEO_NETID_LOGGING_OVERFLOW = icsneojavaJNI.ICSNEO_NETID_LOGGING_OVERFLOW_get();
public final static int ICSNEO_NETID_READ_SETTINGS = icsneojavaJNI.ICSNEO_NETID_READ_SETTINGS_get();
public final static int ICSNEO_NETID_HSCAN4 = icsneojavaJNI.ICSNEO_NETID_HSCAN4_get();
public final static int ICSNEO_NETID_HSCAN5 = icsneojavaJNI.ICSNEO_NETID_HSCAN5_get();
public final static int ICSNEO_NETID_RS232 = icsneojavaJNI.ICSNEO_NETID_RS232_get();
public final static int ICSNEO_NETID_UART = icsneojavaJNI.ICSNEO_NETID_UART_get();
public final static int ICSNEO_NETID_UART2 = icsneojavaJNI.ICSNEO_NETID_UART2_get();
public final static int ICSNEO_NETID_UART3 = icsneojavaJNI.ICSNEO_NETID_UART3_get();
public final static int ICSNEO_NETID_UART4 = icsneojavaJNI.ICSNEO_NETID_UART4_get();
public final static int ICSNEO_NETID_SWCAN2 = icsneojavaJNI.ICSNEO_NETID_SWCAN2_get();
public final static int ICSNEO_NETID_ETHERNET_DAQ = icsneojavaJNI.ICSNEO_NETID_ETHERNET_DAQ_get();
public final static int ICSNEO_NETID_DATA_TO_HOST = icsneojavaJNI.ICSNEO_NETID_DATA_TO_HOST_get();
public final static int ICSNEO_NETID_TEXTAPI_TO_HOST = icsneojavaJNI.ICSNEO_NETID_TEXTAPI_TO_HOST_get();
public final static int ICSNEO_NETID_OP_ETHERNET6 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET6_get();
public final static int ICSNEO_NETID_RED_VBAT = icsneojavaJNI.ICSNEO_NETID_RED_VBAT_get();
public final static int ICSNEO_NETID_OP_ETHERNET7 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET7_get();
public final static int ICSNEO_NETID_OP_ETHERNET8 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET8_get();
public final static int ICSNEO_NETID_OP_ETHERNET9 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET9_get();
public final static int ICSNEO_NETID_OP_ETHERNET10 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET10_get();
public final static int ICSNEO_NETID_OP_ETHERNET11 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET11_get();
public final static int ICSNEO_NETID_FLEXRAY1A = icsneojavaJNI.ICSNEO_NETID_FLEXRAY1A_get();
public final static int ICSNEO_NETID_FLEXRAY1B = icsneojavaJNI.ICSNEO_NETID_FLEXRAY1B_get();
public final static int ICSNEO_NETID_FLEXRAY2A = icsneojavaJNI.ICSNEO_NETID_FLEXRAY2A_get();
public final static int ICSNEO_NETID_FLEXRAY2B = icsneojavaJNI.ICSNEO_NETID_FLEXRAY2B_get();
public final static int ICSNEO_NETID_LIN5 = icsneojavaJNI.ICSNEO_NETID_LIN5_get();
public final static int ICSNEO_NETID_FLEXRAY = icsneojavaJNI.ICSNEO_NETID_FLEXRAY_get();
public final static int ICSNEO_NETID_FLEXRAY2 = icsneojavaJNI.ICSNEO_NETID_FLEXRAY2_get();
public final static int ICSNEO_NETID_OP_ETHERNET12 = icsneojavaJNI.ICSNEO_NETID_OP_ETHERNET12_get();
public final static int ICSNEO_NETID_MOST25 = icsneojavaJNI.ICSNEO_NETID_MOST25_get();
public final static int ICSNEO_NETID_MOST50 = icsneojavaJNI.ICSNEO_NETID_MOST50_get();
public final static int ICSNEO_NETID_MOST150 = icsneojavaJNI.ICSNEO_NETID_MOST150_get();
public final static int ICSNEO_NETID_ETHERNET = icsneojavaJNI.ICSNEO_NETID_ETHERNET_get();
public final static int ICSNEO_NETID_GMFSA = icsneojavaJNI.ICSNEO_NETID_GMFSA_get();
public final static int ICSNEO_NETID_TCP = icsneojavaJNI.ICSNEO_NETID_TCP_get();
public final static int ICSNEO_NETID_HSCAN6 = icsneojavaJNI.ICSNEO_NETID_HSCAN6_get();
public final static int ICSNEO_NETID_HSCAN7 = icsneojavaJNI.ICSNEO_NETID_HSCAN7_get();
public final static int ICSNEO_NETID_LIN6 = icsneojavaJNI.ICSNEO_NETID_LIN6_get();
public final static int ICSNEO_NETID_LSFTCAN2 = icsneojavaJNI.ICSNEO_NETID_LSFTCAN2_get();
public final static int ICSNEO_NETID_HW_COM_LATENCY_TEST = icsneojavaJNI.ICSNEO_NETID_HW_COM_LATENCY_TEST_get();
public final static int ICSNEO_NETID_DEVICE_STATUS = icsneojavaJNI.ICSNEO_NETID_DEVICE_STATUS_get();
public final static int ICSNEO_NETID_ANY = icsneojavaJNI.ICSNEO_NETID_ANY_get();
public final static int ICSNEO_NETID_INVALID = icsneojavaJNI.ICSNEO_NETID_INVALID_get();
public final static int ICSNEO_NETWORK_TYPE_INVALID = icsneojavaJNI.ICSNEO_NETWORK_TYPE_INVALID_get();
public final static int ICSNEO_NETWORK_TYPE_INTERNAL = icsneojavaJNI.ICSNEO_NETWORK_TYPE_INTERNAL_get();
public final static int ICSNEO_NETWORK_TYPE_CAN = icsneojavaJNI.ICSNEO_NETWORK_TYPE_CAN_get();
public final static int ICSNEO_NETWORK_TYPE_LIN = icsneojavaJNI.ICSNEO_NETWORK_TYPE_LIN_get();
public final static int ICSNEO_NETWORK_TYPE_FLEXRAY = icsneojavaJNI.ICSNEO_NETWORK_TYPE_FLEXRAY_get();
public final static int ICSNEO_NETWORK_TYPE_MOST = icsneojavaJNI.ICSNEO_NETWORK_TYPE_MOST_get();
public final static int ICSNEO_NETWORK_TYPE_ETHERNET = icsneojavaJNI.ICSNEO_NETWORK_TYPE_ETHERNET_get();
public final static int ICSNEO_NETWORK_TYPE_ANY = icsneojavaJNI.ICSNEO_NETWORK_TYPE_ANY_get();
public final static int ICSNEO_NETWORK_TYPE_OTHER = icsneojavaJNI.ICSNEO_NETWORK_TYPE_OTHER_get();
}

View File

@ -1,399 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class icsneojavaJNI {
public final static native void icsneo_findAllDevices(long jarg1, neodevice_t jarg1_, int[] jarg2);
public final static native void icsneo_freeUnconnectedDevices();
public final static native boolean icsneo_serialNumToString(long jarg1, StringBuffer jarg2, int[] jarg3);
public final static native long icsneo_serialStringToNum(StringBuffer jarg1);
public final static native boolean icsneo_isValidNeoDevice(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_openDevice(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_closeDevice(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_isOpen(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_goOnline(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_goOffline(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_isOnline(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_enableMessagePolling(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_disableMessagePolling(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_isMessagePollingEnabled(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_getMessages(long jarg1, neodevice_t jarg1_, long jarg2, neomessage_t jarg2_, int[] jarg3, java.math.BigInteger jarg4);
public final static native long icsneo_getPollingMessageLimit(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_setPollingMessageLimit(long jarg1, neodevice_t jarg1_, long jarg2);
public final static native boolean icsneo_getProductName(long jarg1, neodevice_t jarg1_, StringBuffer jarg2, int[] jarg3);
public final static native boolean icsneo_getProductNameForType(long jarg1, StringBuffer jarg2, int[] jarg3);
public final static native boolean icsneo_settingsRefresh(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_settingsApply(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_settingsApplyTemporary(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_settingsApplyDefaults(long jarg1, neodevice_t jarg1_);
public final static native boolean icsneo_settingsApplyDefaultsTemporary(long jarg1, neodevice_t jarg1_);
public final static native int icsneo_settingsReadStructure(long jarg1, neodevice_t jarg1_, long jarg2, long jarg3);
public final static native boolean icsneo_settingsApplyStructure(long jarg1, neodevice_t jarg1_, long jarg2, long jarg3);
public final static native boolean icsneo_settingsApplyStructureTemporary(long jarg1, neodevice_t jarg1_, long jarg2, long jarg3);
public final static native long icsneo_getBaudrate(long jarg1, neodevice_t jarg1_, int jarg2);
public final static native boolean icsneo_setBaudrate(long jarg1, neodevice_t jarg1_, int jarg2, long jarg3);
public final static native long icsneo_getFDBaudrate(long jarg1, neodevice_t jarg1_, int jarg2);
public final static native boolean icsneo_setFDBaudrate(long jarg1, neodevice_t jarg1_, int jarg2, long jarg3);
public final static native boolean icsneo_transmit(long jarg1, neodevice_t jarg1_, long jarg2, neomessage_t jarg2_);
public final static native boolean icsneo_transmitMessages(long jarg1, neodevice_t jarg1_, long jarg2, neomessage_t jarg2_, long jarg3);
public final static native void icsneo_setWriteBlocks(long jarg1, neodevice_t jarg1_, boolean jarg2);
public final static native boolean icsneo_describeDevice(long jarg1, neodevice_t jarg1_, StringBuffer jarg2, int[] jarg3);
public final static native long icsneo_getVersion();
public final static native boolean icsneo_getEvents(long jarg1, neoevent_t jarg1_, int[] jarg2);
public final static native boolean icsneo_getDeviceEvents(long jarg1, neodevice_t jarg1_, long jarg2, neoevent_t jarg2_, int[] jarg3);
public final static native boolean icsneo_getLastError(long jarg1, neoevent_t jarg1_);
public final static native void icsneo_discardAllEvents();
public final static native void icsneo_discardDeviceEvents(long jarg1, neodevice_t jarg1_);
public final static native void icsneo_setEventLimit(long jarg1);
public final static native long icsneo_getEventLimit();
public final static native boolean icsneo_getSupportedDevices(long jarg1, int[] jarg2);
public final static native boolean icsneo_getTimestampResolution(long jarg1, neodevice_t jarg1_, long jarg2);
public final static native void neodevice_t_device_set(long jarg1, neodevice_t jarg1_, long jarg2);
public final static native long neodevice_t_device_get(long jarg1, neodevice_t jarg1_);
public final static native void neodevice_t_handle_set(long jarg1, neodevice_t jarg1_, int jarg2);
public final static native int neodevice_t_handle_get(long jarg1, neodevice_t jarg1_);
public final static native void neodevice_t_type_set(long jarg1, neodevice_t jarg1_, long jarg2);
public final static native long neodevice_t_type_get(long jarg1, neodevice_t jarg1_);
public final static native void neodevice_t_serial_set(long jarg1, neodevice_t jarg1_, String jarg2);
public final static native String neodevice_t_serial_get(long jarg1, neodevice_t jarg1_);
public final static native long new_neodevice_t();
public final static native void delete_neodevice_t(long jarg1);
public final static native void neomessage_statusbitfield_t_globalError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_globalError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_transmitMessage_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_transmitMessage_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_extendedFrame_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_extendedFrame_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_remoteFrame_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_remoteFrame_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_crcError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_crcError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canErrorPassive_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canErrorPassive_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_incompleteFrame_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_incompleteFrame_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_lostArbitration_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_lostArbitration_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_undefinedError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_undefinedError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canBusOff_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canBusOff_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canErrorWarning_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canErrorWarning_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canBusShortedPlus_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canBusShortedPlus_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canBusShortedGround_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canBusShortedGround_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_checksumError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_checksumError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_badMessageBitTimeError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_badMessageBitTimeError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_ifrData_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_ifrData_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_hardwareCommError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_hardwareCommError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_expectedLengthError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_expectedLengthError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_incomingNoMatch_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_incomingNoMatch_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_statusBreak_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_statusBreak_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_avsiRecOverflow_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_avsiRecOverflow_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_testTrigger_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_testTrigger_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_audioComment_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_audioComment_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_gpsData_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_gpsData_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_analogDigitalInput_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_analogDigitalInput_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_textComment_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_textComment_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_networkMessageType_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_networkMessageType_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_vsiTXUnderrun_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_vsiTXUnderrun_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_vsiIFRCRCBit_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_vsiIFRCRCBit_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_initMessage_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_initMessage_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_flexraySecondStartupFrame_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_flexraySecondStartupFrame_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_extended_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_extended_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_hasValue_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_hasValue_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_valueIsBoolean_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_valueIsBoolean_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_highVoltage_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_highVoltage_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_longMessage_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_longMessage_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_globalChange_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_globalChange_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_errorFrame_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_errorFrame_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_endOfLongMessage_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_endOfLongMessage_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linErrorRXBreakNotZero_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linErrorRXBreakNotZero_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linErrorRXBreakTooShort_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linErrorRXBreakTooShort_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linErrorRXSyncNot55_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linErrorRXSyncNot55_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linErrorRXDataGreaterEight_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linErrorRXDataGreaterEight_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linErrorTXRXMismatch_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linErrorTXRXMismatch_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linErrorMessageIDParity_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linErrorMessageIDParity_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linSyncFrameError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linSyncFrameError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linIDFrameError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linIDFrameError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linSlaveByteError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linSlaveByteError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_rxTimeoutError_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_rxTimeoutError_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_linNoSlaveData_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_linNoSlaveData_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canfdESI_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canfdESI_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canfdIDE_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canfdIDE_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canfdRTR_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canfdRTR_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canfdFDF_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canfdFDF_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_canfdBRS_set(long jarg1, neomessage_statusbitfield_t jarg1_, long jarg2);
public final static native long neomessage_statusbitfield_t_canfdBRS_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native void neomessage_statusbitfield_t_statusBitfield_set(long jarg1, neomessage_statusbitfield_t jarg1_, long[] jarg2);
public final static native long[] neomessage_statusbitfield_t_statusBitfield_get(long jarg1, neomessage_statusbitfield_t jarg1_);
public final static native long new_neomessage_statusbitfield_t();
public final static native void delete_neomessage_statusbitfield_t(long jarg1);
public final static native void neomessage_t_status_set(long jarg1, neomessage_t jarg1_, long jarg2, neomessage_statusbitfield_t jarg2_);
public final static native long neomessage_t_status_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_timestamp_set(long jarg1, neomessage_t jarg1_, java.math.BigInteger jarg2);
public final static native java.math.BigInteger neomessage_t_timestamp_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_timestampReserved_set(long jarg1, neomessage_t jarg1_, java.math.BigInteger jarg2);
public final static native java.math.BigInteger neomessage_t_timestampReserved_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_data_set(long jarg1, neomessage_t jarg1_, byte[] jarg2);
public final static native byte[] neomessage_t_data_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_length_set(long jarg1, neomessage_t jarg1_, long jarg2);
public final static native long neomessage_t_length_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_header_set(long jarg1, neomessage_t jarg1_, short[] jarg2);
public final static native short[] neomessage_t_header_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_netid_set(long jarg1, neomessage_t jarg1_, int jarg2);
public final static native int neomessage_t_netid_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_type_set(long jarg1, neomessage_t jarg1_, short jarg2);
public final static native short neomessage_t_type_get(long jarg1, neomessage_t jarg1_);
public final static native void neomessage_t_reserved_set(long jarg1, neomessage_t jarg1_, short[] jarg2);
public final static native short[] neomessage_t_reserved_get(long jarg1, neomessage_t jarg1_);
public final static native long new_neomessage_t();
public final static native void delete_neomessage_t(long jarg1);
public final static native void neomessage_can_t_status_set(long jarg1, neomessage_can_t jarg1_, long jarg2, neomessage_statusbitfield_t jarg2_);
public final static native long neomessage_can_t_status_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_timestamp_set(long jarg1, neomessage_can_t jarg1_, java.math.BigInteger jarg2);
public final static native java.math.BigInteger neomessage_can_t_timestamp_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_timestampReserved_set(long jarg1, neomessage_can_t jarg1_, java.math.BigInteger jarg2);
public final static native java.math.BigInteger neomessage_can_t_timestampReserved_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_data_set(long jarg1, neomessage_can_t jarg1_, byte[] jarg2);
public final static native byte[] neomessage_can_t_data_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_length_set(long jarg1, neomessage_can_t jarg1_, long jarg2);
public final static native long neomessage_can_t_length_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_arbid_set(long jarg1, neomessage_can_t jarg1_, long jarg2);
public final static native long neomessage_can_t_arbid_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_netid_set(long jarg1, neomessage_can_t jarg1_, int jarg2);
public final static native int neomessage_can_t_netid_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_type_set(long jarg1, neomessage_can_t jarg1_, short jarg2);
public final static native short neomessage_can_t_type_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_dlcOnWire_set(long jarg1, neomessage_can_t jarg1_, short jarg2);
public final static native short neomessage_can_t_dlcOnWire_get(long jarg1, neomessage_can_t jarg1_);
public final static native void neomessage_can_t_reserved_set(long jarg1, neomessage_can_t jarg1_, short[] jarg2);
public final static native short[] neomessage_can_t_reserved_get(long jarg1, neomessage_can_t jarg1_);
public final static native long new_neomessage_can_t();
public final static native void delete_neomessage_can_t(long jarg1);
public final static native void neomessage_eth_t_status_set(long jarg1, neomessage_eth_t jarg1_, long jarg2, neomessage_statusbitfield_t jarg2_);
public final static native long neomessage_eth_t_status_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_timestamp_set(long jarg1, neomessage_eth_t jarg1_, java.math.BigInteger jarg2);
public final static native java.math.BigInteger neomessage_eth_t_timestamp_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_timestampReserved_set(long jarg1, neomessage_eth_t jarg1_, java.math.BigInteger jarg2);
public final static native java.math.BigInteger neomessage_eth_t_timestampReserved_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_data_set(long jarg1, neomessage_eth_t jarg1_, byte[] jarg2);
public final static native byte[] neomessage_eth_t_data_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_length_set(long jarg1, neomessage_eth_t jarg1_, long jarg2);
public final static native long neomessage_eth_t_length_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_preemptionFlags_set(long jarg1, neomessage_eth_t jarg1_, short jarg2);
public final static native short neomessage_eth_t_preemptionFlags_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_reservedHeader_set(long jarg1, neomessage_eth_t jarg1_, short[] jarg2);
public final static native short[] neomessage_eth_t_reservedHeader_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_netid_set(long jarg1, neomessage_eth_t jarg1_, int jarg2);
public final static native int neomessage_eth_t_netid_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_type_set(long jarg1, neomessage_eth_t jarg1_, short jarg2);
public final static native short neomessage_eth_t_type_get(long jarg1, neomessage_eth_t jarg1_);
public final static native void neomessage_eth_t_reserved_set(long jarg1, neomessage_eth_t jarg1_, short[] jarg2);
public final static native short[] neomessage_eth_t_reserved_get(long jarg1, neomessage_eth_t jarg1_);
public final static native long new_neomessage_eth_t();
public final static native void delete_neomessage_eth_t(long jarg1);
public final static native int ICSNEO_DEVICETYPE_LONGEST_NAME_get();
public final static native int ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION_get();
public final static native void neoversion_t_major_set(long jarg1, neoversion_t jarg1_, int jarg2);
public final static native int neoversion_t_major_get(long jarg1, neoversion_t jarg1_);
public final static native void neoversion_t_minor_set(long jarg1, neoversion_t jarg1_, int jarg2);
public final static native int neoversion_t_minor_get(long jarg1, neoversion_t jarg1_);
public final static native void neoversion_t_patch_set(long jarg1, neoversion_t jarg1_, int jarg2);
public final static native int neoversion_t_patch_get(long jarg1, neoversion_t jarg1_);
public final static native void neoversion_t_metadata_set(long jarg1, neoversion_t jarg1_, String jarg2);
public final static native String neoversion_t_metadata_get(long jarg1, neoversion_t jarg1_);
public final static native void neoversion_t_buildBranch_set(long jarg1, neoversion_t jarg1_, String jarg2);
public final static native String neoversion_t_buildBranch_get(long jarg1, neoversion_t jarg1_);
public final static native void neoversion_t_buildTag_set(long jarg1, neoversion_t jarg1_, String jarg2);
public final static native String neoversion_t_buildTag_get(long jarg1, neoversion_t jarg1_);
public final static native void neoversion_t_reserved_set(long jarg1, neoversion_t jarg1_, String jarg2);
public final static native String neoversion_t_reserved_get(long jarg1, neoversion_t jarg1_);
public final static native long new_neoversion_t();
public final static native void delete_neoversion_t(long jarg1);
public final static native void neoevent_t_description_set(long jarg1, neoevent_t jarg1_, String jarg2);
public final static native String neoevent_t_description_get(long jarg1, neoevent_t jarg1_);
public final static native void neoevent_t_timestamp_set(long jarg1, neoevent_t jarg1_, long jarg2);
public final static native long neoevent_t_timestamp_get(long jarg1, neoevent_t jarg1_);
public final static native void neoevent_t_eventNumber_set(long jarg1, neoevent_t jarg1_, long jarg2);
public final static native long neoevent_t_eventNumber_get(long jarg1, neoevent_t jarg1_);
public final static native void neoevent_t_severity_set(long jarg1, neoevent_t jarg1_, short jarg2);
public final static native short neoevent_t_severity_get(long jarg1, neoevent_t jarg1_);
public final static native void neoevent_t_serial_set(long jarg1, neoevent_t jarg1_, String jarg2);
public final static native String neoevent_t_serial_get(long jarg1, neoevent_t jarg1_);
public final static native void neoevent_t_reserved_set(long jarg1, neoevent_t jarg1_, short[] jarg2);
public final static native short[] neoevent_t_reserved_get(long jarg1, neoevent_t jarg1_);
public final static native long new_neoevent_t();
public final static native void delete_neoevent_t(long jarg1);
public final static native int ICSNEO_NETID_DEVICE_get();
public final static native int ICSNEO_NETID_HSCAN_get();
public final static native int ICSNEO_NETID_MSCAN_get();
public final static native int ICSNEO_NETID_SWCAN_get();
public final static native int ICSNEO_NETID_LSFTCAN_get();
public final static native int ICSNEO_NETID_FORDSCP_get();
public final static native int ICSNEO_NETID_J1708_get();
public final static native int ICSNEO_NETID_AUX_get();
public final static native int ICSNEO_NETID_J1850VPW_get();
public final static native int ICSNEO_NETID_ISO_get();
public final static native int ICSNEO_NETID_MAIN51_get();
public final static native int ICSNEO_NETID_RED_get();
public final static native int ICSNEO_NETID_SCI_get();
public final static native int ICSNEO_NETID_ISO2_get();
public final static native int ICSNEO_NETID_ISO14230_get();
public final static native int ICSNEO_NETID_LIN_get();
public final static native int ICSNEO_NETID_OP_ETHERNET1_get();
public final static native int ICSNEO_NETID_OP_ETHERNET2_get();
public final static native int ICSNEO_NETID_OP_ETHERNET3_get();
public final static native int ICSNEO_NETID_RED_EXT_MEMORYREAD_get();
public final static native int ICSNEO_NETID_RED_INT_MEMORYREAD_get();
public final static native int ICSNEO_NETID_RED_DFLASH_READ_get();
public final static native int ICSNEO_NETID_RED_SDCARD_READ_get();
public final static native int ICSNEO_NETID_CAN_ERRBITS_get();
public final static native int ICSNEO_NETID_RED_DFLASH_WRITE_DONE_get();
public final static native int ICSNEO_NETID_RED_WAVE_CAN1_LOGICAL_get();
public final static native int ICSNEO_NETID_RED_WAVE_CAN2_LOGICAL_get();
public final static native int ICSNEO_NETID_RED_WAVE_LIN1_LOGICAL_get();
public final static native int ICSNEO_NETID_RED_WAVE_LIN2_LOGICAL_get();
public final static native int ICSNEO_NETID_RED_WAVE_LIN1_ANALOG_get();
public final static native int ICSNEO_NETID_RED_WAVE_LIN2_ANALOG_get();
public final static native int ICSNEO_NETID_RED_WAVE_MISC_ANALOG_get();
public final static native int ICSNEO_NETID_RED_WAVE_MISCDIO2_LOGICAL_get();
public final static native int ICSNEO_NETID_RED_NETWORK_COM_ENABLE_EX_get();
public final static native int ICSNEO_NETID_RED_NEOVI_NETWORK_get();
public final static native int ICSNEO_NETID_RED_READ_BAUD_SETTINGS_get();
public final static native int ICSNEO_NETID_RED_OLDFORMAT_get();
public final static native int ICSNEO_NETID_RED_SCOPE_CAPTURE_get();
public final static native int ICSNEO_NETID_RED_HARDWARE_EXCEP_get();
public final static native int ICSNEO_NETID_RED_GET_RTC_get();
public final static native int ICSNEO_NETID_ISO3_get();
public final static native int ICSNEO_NETID_HSCAN2_get();
public final static native int ICSNEO_NETID_HSCAN3_get();
public final static native int ICSNEO_NETID_OP_ETHERNET4_get();
public final static native int ICSNEO_NETID_OP_ETHERNET5_get();
public final static native int ICSNEO_NETID_ISO4_get();
public final static native int ICSNEO_NETID_LIN2_get();
public final static native int ICSNEO_NETID_LIN3_get();
public final static native int ICSNEO_NETID_LIN4_get();
public final static native int ICSNEO_NETID_RED_APP_ERROR_get();
public final static native int ICSNEO_NETID_CGI_get();
public final static native int ICSNEO_NETID_RESET_STATUS_get();
public final static native int ICSNEO_NETID_FB_STATUS_get();
public final static native int ICSNEO_NETID_APP_SIGNAL_STATUS_get();
public final static native int ICSNEO_NETID_READ_DATALINK_CM_TX_MSG_get();
public final static native int ICSNEO_NETID_READ_DATALINK_CM_RX_MSG_get();
public final static native int ICSNEO_NETID_LOGGING_OVERFLOW_get();
public final static native int ICSNEO_NETID_READ_SETTINGS_get();
public final static native int ICSNEO_NETID_HSCAN4_get();
public final static native int ICSNEO_NETID_HSCAN5_get();
public final static native int ICSNEO_NETID_RS232_get();
public final static native int ICSNEO_NETID_UART_get();
public final static native int ICSNEO_NETID_UART2_get();
public final static native int ICSNEO_NETID_UART3_get();
public final static native int ICSNEO_NETID_UART4_get();
public final static native int ICSNEO_NETID_SWCAN2_get();
public final static native int ICSNEO_NETID_ETHERNET_DAQ_get();
public final static native int ICSNEO_NETID_DATA_TO_HOST_get();
public final static native int ICSNEO_NETID_TEXTAPI_TO_HOST_get();
public final static native int ICSNEO_NETID_OP_ETHERNET6_get();
public final static native int ICSNEO_NETID_RED_VBAT_get();
public final static native int ICSNEO_NETID_OP_ETHERNET7_get();
public final static native int ICSNEO_NETID_OP_ETHERNET8_get();
public final static native int ICSNEO_NETID_OP_ETHERNET9_get();
public final static native int ICSNEO_NETID_OP_ETHERNET10_get();
public final static native int ICSNEO_NETID_OP_ETHERNET11_get();
public final static native int ICSNEO_NETID_FLEXRAY1A_get();
public final static native int ICSNEO_NETID_FLEXRAY1B_get();
public final static native int ICSNEO_NETID_FLEXRAY2A_get();
public final static native int ICSNEO_NETID_FLEXRAY2B_get();
public final static native int ICSNEO_NETID_LIN5_get();
public final static native int ICSNEO_NETID_FLEXRAY_get();
public final static native int ICSNEO_NETID_FLEXRAY2_get();
public final static native int ICSNEO_NETID_OP_ETHERNET12_get();
public final static native int ICSNEO_NETID_MOST25_get();
public final static native int ICSNEO_NETID_MOST50_get();
public final static native int ICSNEO_NETID_MOST150_get();
public final static native int ICSNEO_NETID_ETHERNET_get();
public final static native int ICSNEO_NETID_GMFSA_get();
public final static native int ICSNEO_NETID_TCP_get();
public final static native int ICSNEO_NETID_HSCAN6_get();
public final static native int ICSNEO_NETID_HSCAN7_get();
public final static native int ICSNEO_NETID_LIN6_get();
public final static native int ICSNEO_NETID_LSFTCAN2_get();
public final static native int ICSNEO_NETID_HW_COM_LATENCY_TEST_get();
public final static native int ICSNEO_NETID_DEVICE_STATUS_get();
public final static native int ICSNEO_NETID_ANY_get();
public final static native int ICSNEO_NETID_INVALID_get();
public final static native int ICSNEO_NETWORK_TYPE_INVALID_get();
public final static native int ICSNEO_NETWORK_TYPE_INTERNAL_get();
public final static native int ICSNEO_NETWORK_TYPE_CAN_get();
public final static native int ICSNEO_NETWORK_TYPE_LIN_get();
public final static native int ICSNEO_NETWORK_TYPE_FLEXRAY_get();
public final static native int ICSNEO_NETWORK_TYPE_MOST_get();
public final static native int ICSNEO_NETWORK_TYPE_ETHERNET_get();
public final static native int ICSNEO_NETWORK_TYPE_ANY_get();
public final static native int ICSNEO_NETWORK_TYPE_OTHER_get();
public final static native long neomessage_can_t_cast(long jarg1, neomessage_t jarg1_);
public final static native long neomessage_eth_t_cast(long jarg1, neomessage_t jarg1_);
public final static native long from_can_neomessage_t_cast(long jarg1, neomessage_can_t jarg1_);
public final static native long from_eth_neomessage_t_cast(long jarg1, neomessage_eth_t jarg1_);
public final static native long new_neodevice_t_array(int jarg1);
public final static native void delete_neodevice_t_array(long jarg1, neodevice_t jarg1_);
public final static native long neodevice_t_array_getitem(long jarg1, neodevice_t jarg1_, int jarg2);
public final static native void neodevice_t_array_setitem(long jarg1, neodevice_t jarg1_, int jarg2, long jarg3, neodevice_t jarg3_);
public final static native long new_neoevent_t_array(int jarg1);
public final static native void delete_neoevent_t_array(long jarg1, neoevent_t jarg1_);
public final static native long neoevent_t_array_getitem(long jarg1, neoevent_t jarg1_, int jarg2);
public final static native void neoevent_t_array_setitem(long jarg1, neoevent_t jarg1_, int jarg2, long jarg3, neoevent_t jarg3_);
public final static native long new_neomessage_t_array(int jarg1);
public final static native void delete_neomessage_t_array(long jarg1, neomessage_t jarg1_);
public final static native long neomessage_t_array_getitem(long jarg1, neomessage_t jarg1_, int jarg2);
public final static native void neomessage_t_array_setitem(long jarg1, neomessage_t jarg1_, int jarg2, long jarg3, neomessage_t jarg3_);
}

View File

@ -1,75 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class neodevice_t {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected neodevice_t(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(neodevice_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneojavaJNI.delete_neodevice_t(swigCPtr);
}
swigCPtr = 0;
}
}
public void setDevice(SWIGTYPE_p_void value) {
icsneojavaJNI.neodevice_t_device_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
}
public SWIGTYPE_p_void getDevice() {
long cPtr = icsneojavaJNI.neodevice_t_device_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
}
public void setHandle(int value) {
icsneojavaJNI.neodevice_t_handle_set(swigCPtr, this, value);
}
public int getHandle() {
return icsneojavaJNI.neodevice_t_handle_get(swigCPtr, this);
}
public void setType(long value) {
icsneojavaJNI.neodevice_t_type_set(swigCPtr, this, value);
}
public long getType() {
return icsneojavaJNI.neodevice_t_type_get(swigCPtr, this);
}
public void setSerial(String value) {
icsneojavaJNI.neodevice_t_serial_set(swigCPtr, this, value);
}
public String getSerial() {
return icsneojavaJNI.neodevice_t_serial_get(swigCPtr, this);
}
public neodevice_t() {
this(icsneojavaJNI.new_neodevice_t(), true);
}
}

View File

@ -1,90 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class neoevent_t {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected neoevent_t(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(neoevent_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneojavaJNI.delete_neoevent_t(swigCPtr);
}
swigCPtr = 0;
}
}
public void setDescription(String value) {
icsneojavaJNI.neoevent_t_description_set(swigCPtr, this, value);
}
public String getDescription() {
return icsneojavaJNI.neoevent_t_description_get(swigCPtr, this);
}
public void setTimestamp(SWIGTYPE_p_time_t value) {
icsneojavaJNI.neoevent_t_timestamp_set(swigCPtr, this, SWIGTYPE_p_time_t.getCPtr(value));
}
public SWIGTYPE_p_time_t getTimestamp() {
return new SWIGTYPE_p_time_t(icsneojavaJNI.neoevent_t_timestamp_get(swigCPtr, this), true);
}
public void setEventNumber(long value) {
icsneojavaJNI.neoevent_t_eventNumber_set(swigCPtr, this, value);
}
public long getEventNumber() {
return icsneojavaJNI.neoevent_t_eventNumber_get(swigCPtr, this);
}
public void setSeverity(short value) {
icsneojavaJNI.neoevent_t_severity_set(swigCPtr, this, value);
}
public short getSeverity() {
return icsneojavaJNI.neoevent_t_severity_get(swigCPtr, this);
}
public void setSerial(String value) {
icsneojavaJNI.neoevent_t_serial_set(swigCPtr, this, value);
}
public String getSerial() {
return icsneojavaJNI.neoevent_t_serial_get(swigCPtr, this);
}
public void setReserved(short[] value) {
icsneojavaJNI.neoevent_t_reserved_set(swigCPtr, this, value);
}
public short[] getReserved() {
return icsneojavaJNI.neoevent_t_reserved_get(swigCPtr, this);
}
public neoevent_t() {
this(icsneojavaJNI.new_neoevent_t(), true);
}
}

View File

@ -1,123 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class neomessage_can_t {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected neomessage_can_t(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(neomessage_can_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneojavaJNI.delete_neomessage_can_t(swigCPtr);
}
swigCPtr = 0;
}
}
public void setStatus(neomessage_statusbitfield_t value) {
icsneojavaJNI.neomessage_can_t_status_set(swigCPtr, this, neomessage_statusbitfield_t.getCPtr(value), value);
}
public neomessage_statusbitfield_t getStatus() {
long cPtr = icsneojavaJNI.neomessage_can_t_status_get(swigCPtr, this);
return (cPtr == 0) ? null : new neomessage_statusbitfield_t(cPtr, false);
}
public void setTimestamp(java.math.BigInteger value) {
icsneojavaJNI.neomessage_can_t_timestamp_set(swigCPtr, this, value);
}
public java.math.BigInteger getTimestamp() {
return icsneojavaJNI.neomessage_can_t_timestamp_get(swigCPtr, this);
}
public void setTimestampReserved(java.math.BigInteger value) {
icsneojavaJNI.neomessage_can_t_timestampReserved_set(swigCPtr, this, value);
}
public java.math.BigInteger getTimestampReserved() {
return icsneojavaJNI.neomessage_can_t_timestampReserved_get(swigCPtr, this);
}
public void setData(byte[] value) {
icsneojavaJNI.neomessage_can_t_data_set(swigCPtr, this, value);
}
public byte[] getData() {
return icsneojavaJNI.neomessage_can_t_data_get(swigCPtr, this);
}
public void setLength(long value) {
icsneojavaJNI.neomessage_can_t_length_set(swigCPtr, this, value);
}
public long getLength() {
return icsneojavaJNI.neomessage_can_t_length_get(swigCPtr, this);
}
public void setArbid(long value) {
icsneojavaJNI.neomessage_can_t_arbid_set(swigCPtr, this, value);
}
public long getArbid() {
return icsneojavaJNI.neomessage_can_t_arbid_get(swigCPtr, this);
}
public void setNetid(int value) {
icsneojavaJNI.neomessage_can_t_netid_set(swigCPtr, this, value);
}
public int getNetid() {
return icsneojavaJNI.neomessage_can_t_netid_get(swigCPtr, this);
}
public void setType(short value) {
icsneojavaJNI.neomessage_can_t_type_set(swigCPtr, this, value);
}
public short getType() {
return icsneojavaJNI.neomessage_can_t_type_get(swigCPtr, this);
}
public void setDlcOnWire(short value) {
icsneojavaJNI.neomessage_can_t_dlcOnWire_set(swigCPtr, this, value);
}
public short getDlcOnWire() {
return icsneojavaJNI.neomessage_can_t_dlcOnWire_get(swigCPtr, this);
}
public void setReserved(short[] value) {
icsneojavaJNI.neomessage_can_t_reserved_set(swigCPtr, this, value);
}
public short[] getReserved() {
return icsneojavaJNI.neomessage_can_t_reserved_get(swigCPtr, this);
}
public neomessage_can_t() {
this(icsneojavaJNI.new_neomessage_can_t(), true);
}
}

View File

@ -1,123 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class neomessage_eth_t {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected neomessage_eth_t(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(neomessage_eth_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneojavaJNI.delete_neomessage_eth_t(swigCPtr);
}
swigCPtr = 0;
}
}
public void setStatus(neomessage_statusbitfield_t value) {
icsneojavaJNI.neomessage_eth_t_status_set(swigCPtr, this, neomessage_statusbitfield_t.getCPtr(value), value);
}
public neomessage_statusbitfield_t getStatus() {
long cPtr = icsneojavaJNI.neomessage_eth_t_status_get(swigCPtr, this);
return (cPtr == 0) ? null : new neomessage_statusbitfield_t(cPtr, false);
}
public void setTimestamp(java.math.BigInteger value) {
icsneojavaJNI.neomessage_eth_t_timestamp_set(swigCPtr, this, value);
}
public java.math.BigInteger getTimestamp() {
return icsneojavaJNI.neomessage_eth_t_timestamp_get(swigCPtr, this);
}
public void setTimestampReserved(java.math.BigInteger value) {
icsneojavaJNI.neomessage_eth_t_timestampReserved_set(swigCPtr, this, value);
}
public java.math.BigInteger getTimestampReserved() {
return icsneojavaJNI.neomessage_eth_t_timestampReserved_get(swigCPtr, this);
}
public void setData(byte[] value) {
icsneojavaJNI.neomessage_eth_t_data_set(swigCPtr, this, value);
}
public byte[] getData() {
return icsneojavaJNI.neomessage_eth_t_data_get(swigCPtr, this);
}
public void setLength(long value) {
icsneojavaJNI.neomessage_eth_t_length_set(swigCPtr, this, value);
}
public long getLength() {
return icsneojavaJNI.neomessage_eth_t_length_get(swigCPtr, this);
}
public void setPreemptionFlags(short value) {
icsneojavaJNI.neomessage_eth_t_preemptionFlags_set(swigCPtr, this, value);
}
public short getPreemptionFlags() {
return icsneojavaJNI.neomessage_eth_t_preemptionFlags_get(swigCPtr, this);
}
public void setReservedHeader(short[] value) {
icsneojavaJNI.neomessage_eth_t_reservedHeader_set(swigCPtr, this, value);
}
public short[] getReservedHeader() {
return icsneojavaJNI.neomessage_eth_t_reservedHeader_get(swigCPtr, this);
}
public void setNetid(int value) {
icsneojavaJNI.neomessage_eth_t_netid_set(swigCPtr, this, value);
}
public int getNetid() {
return icsneojavaJNI.neomessage_eth_t_netid_get(swigCPtr, this);
}
public void setType(short value) {
icsneojavaJNI.neomessage_eth_t_type_set(swigCPtr, this, value);
}
public short getType() {
return icsneojavaJNI.neomessage_eth_t_type_get(swigCPtr, this);
}
public void setReserved(short[] value) {
icsneojavaJNI.neomessage_eth_t_reserved_set(swigCPtr, this, value);
}
public short[] getReserved() {
return icsneojavaJNI.neomessage_eth_t_reserved_get(swigCPtr, this);
}
public neomessage_eth_t() {
this(icsneojavaJNI.new_neomessage_eth_t(), true);
}
}

View File

@ -1,490 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class neomessage_statusbitfield_t {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected neomessage_statusbitfield_t(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(neomessage_statusbitfield_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneojavaJNI.delete_neomessage_statusbitfield_t(swigCPtr);
}
swigCPtr = 0;
}
}
public void setGlobalError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_globalError_set(swigCPtr, this, value);
}
public long getGlobalError() {
return icsneojavaJNI.neomessage_statusbitfield_t_globalError_get(swigCPtr, this);
}
public void setTransmitMessage(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_transmitMessage_set(swigCPtr, this, value);
}
public long getTransmitMessage() {
return icsneojavaJNI.neomessage_statusbitfield_t_transmitMessage_get(swigCPtr, this);
}
public void setExtendedFrame(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_extendedFrame_set(swigCPtr, this, value);
}
public long getExtendedFrame() {
return icsneojavaJNI.neomessage_statusbitfield_t_extendedFrame_get(swigCPtr, this);
}
public void setRemoteFrame(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_remoteFrame_set(swigCPtr, this, value);
}
public long getRemoteFrame() {
return icsneojavaJNI.neomessage_statusbitfield_t_remoteFrame_get(swigCPtr, this);
}
public void setCrcError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_crcError_set(swigCPtr, this, value);
}
public long getCrcError() {
return icsneojavaJNI.neomessage_statusbitfield_t_crcError_get(swigCPtr, this);
}
public void setCanErrorPassive(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canErrorPassive_set(swigCPtr, this, value);
}
public long getCanErrorPassive() {
return icsneojavaJNI.neomessage_statusbitfield_t_canErrorPassive_get(swigCPtr, this);
}
public void setIncompleteFrame(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_incompleteFrame_set(swigCPtr, this, value);
}
public long getIncompleteFrame() {
return icsneojavaJNI.neomessage_statusbitfield_t_incompleteFrame_get(swigCPtr, this);
}
public void setLostArbitration(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_lostArbitration_set(swigCPtr, this, value);
}
public long getLostArbitration() {
return icsneojavaJNI.neomessage_statusbitfield_t_lostArbitration_get(swigCPtr, this);
}
public void setUndefinedError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_undefinedError_set(swigCPtr, this, value);
}
public long getUndefinedError() {
return icsneojavaJNI.neomessage_statusbitfield_t_undefinedError_get(swigCPtr, this);
}
public void setCanBusOff(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canBusOff_set(swigCPtr, this, value);
}
public long getCanBusOff() {
return icsneojavaJNI.neomessage_statusbitfield_t_canBusOff_get(swigCPtr, this);
}
public void setCanErrorWarning(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canErrorWarning_set(swigCPtr, this, value);
}
public long getCanErrorWarning() {
return icsneojavaJNI.neomessage_statusbitfield_t_canErrorWarning_get(swigCPtr, this);
}
public void setCanBusShortedPlus(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canBusShortedPlus_set(swigCPtr, this, value);
}
public long getCanBusShortedPlus() {
return icsneojavaJNI.neomessage_statusbitfield_t_canBusShortedPlus_get(swigCPtr, this);
}
public void setCanBusShortedGround(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canBusShortedGround_set(swigCPtr, this, value);
}
public long getCanBusShortedGround() {
return icsneojavaJNI.neomessage_statusbitfield_t_canBusShortedGround_get(swigCPtr, this);
}
public void setChecksumError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_checksumError_set(swigCPtr, this, value);
}
public long getChecksumError() {
return icsneojavaJNI.neomessage_statusbitfield_t_checksumError_get(swigCPtr, this);
}
public void setBadMessageBitTimeError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_badMessageBitTimeError_set(swigCPtr, this, value);
}
public long getBadMessageBitTimeError() {
return icsneojavaJNI.neomessage_statusbitfield_t_badMessageBitTimeError_get(swigCPtr, this);
}
public void setIfrData(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_ifrData_set(swigCPtr, this, value);
}
public long getIfrData() {
return icsneojavaJNI.neomessage_statusbitfield_t_ifrData_get(swigCPtr, this);
}
public void setHardwareCommError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_hardwareCommError_set(swigCPtr, this, value);
}
public long getHardwareCommError() {
return icsneojavaJNI.neomessage_statusbitfield_t_hardwareCommError_get(swigCPtr, this);
}
public void setExpectedLengthError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_expectedLengthError_set(swigCPtr, this, value);
}
public long getExpectedLengthError() {
return icsneojavaJNI.neomessage_statusbitfield_t_expectedLengthError_get(swigCPtr, this);
}
public void setIncomingNoMatch(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_incomingNoMatch_set(swigCPtr, this, value);
}
public long getIncomingNoMatch() {
return icsneojavaJNI.neomessage_statusbitfield_t_incomingNoMatch_get(swigCPtr, this);
}
public void setStatusBreak(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_statusBreak_set(swigCPtr, this, value);
}
public long getStatusBreak() {
return icsneojavaJNI.neomessage_statusbitfield_t_statusBreak_get(swigCPtr, this);
}
public void setAvsiRecOverflow(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_avsiRecOverflow_set(swigCPtr, this, value);
}
public long getAvsiRecOverflow() {
return icsneojavaJNI.neomessage_statusbitfield_t_avsiRecOverflow_get(swigCPtr, this);
}
public void setTestTrigger(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_testTrigger_set(swigCPtr, this, value);
}
public long getTestTrigger() {
return icsneojavaJNI.neomessage_statusbitfield_t_testTrigger_get(swigCPtr, this);
}
public void setAudioComment(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_audioComment_set(swigCPtr, this, value);
}
public long getAudioComment() {
return icsneojavaJNI.neomessage_statusbitfield_t_audioComment_get(swigCPtr, this);
}
public void setGpsData(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_gpsData_set(swigCPtr, this, value);
}
public long getGpsData() {
return icsneojavaJNI.neomessage_statusbitfield_t_gpsData_get(swigCPtr, this);
}
public void setAnalogDigitalInput(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_analogDigitalInput_set(swigCPtr, this, value);
}
public long getAnalogDigitalInput() {
return icsneojavaJNI.neomessage_statusbitfield_t_analogDigitalInput_get(swigCPtr, this);
}
public void setTextComment(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_textComment_set(swigCPtr, this, value);
}
public long getTextComment() {
return icsneojavaJNI.neomessage_statusbitfield_t_textComment_get(swigCPtr, this);
}
public void setNetworkMessageType(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_networkMessageType_set(swigCPtr, this, value);
}
public long getNetworkMessageType() {
return icsneojavaJNI.neomessage_statusbitfield_t_networkMessageType_get(swigCPtr, this);
}
public void setVsiTXUnderrun(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_vsiTXUnderrun_set(swigCPtr, this, value);
}
public long getVsiTXUnderrun() {
return icsneojavaJNI.neomessage_statusbitfield_t_vsiTXUnderrun_get(swigCPtr, this);
}
public void setVsiIFRCRCBit(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_vsiIFRCRCBit_set(swigCPtr, this, value);
}
public long getVsiIFRCRCBit() {
return icsneojavaJNI.neomessage_statusbitfield_t_vsiIFRCRCBit_get(swigCPtr, this);
}
public void setInitMessage(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_initMessage_set(swigCPtr, this, value);
}
public long getInitMessage() {
return icsneojavaJNI.neomessage_statusbitfield_t_initMessage_get(swigCPtr, this);
}
public void setFlexraySecondStartupFrame(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_flexraySecondStartupFrame_set(swigCPtr, this, value);
}
public long getFlexraySecondStartupFrame() {
return icsneojavaJNI.neomessage_statusbitfield_t_flexraySecondStartupFrame_get(swigCPtr, this);
}
public void setExtended(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_extended_set(swigCPtr, this, value);
}
public long getExtended() {
return icsneojavaJNI.neomessage_statusbitfield_t_extended_get(swigCPtr, this);
}
public void setHasValue(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_hasValue_set(swigCPtr, this, value);
}
public long getHasValue() {
return icsneojavaJNI.neomessage_statusbitfield_t_hasValue_get(swigCPtr, this);
}
public void setValueIsBoolean(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_valueIsBoolean_set(swigCPtr, this, value);
}
public long getValueIsBoolean() {
return icsneojavaJNI.neomessage_statusbitfield_t_valueIsBoolean_get(swigCPtr, this);
}
public void setHighVoltage(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_highVoltage_set(swigCPtr, this, value);
}
public long getHighVoltage() {
return icsneojavaJNI.neomessage_statusbitfield_t_highVoltage_get(swigCPtr, this);
}
public void setLongMessage(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_longMessage_set(swigCPtr, this, value);
}
public long getLongMessage() {
return icsneojavaJNI.neomessage_statusbitfield_t_longMessage_get(swigCPtr, this);
}
public void setGlobalChange(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_globalChange_set(swigCPtr, this, value);
}
public long getGlobalChange() {
return icsneojavaJNI.neomessage_statusbitfield_t_globalChange_get(swigCPtr, this);
}
public void setErrorFrame(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_errorFrame_set(swigCPtr, this, value);
}
public long getErrorFrame() {
return icsneojavaJNI.neomessage_statusbitfield_t_errorFrame_get(swigCPtr, this);
}
public void setEndOfLongMessage(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_endOfLongMessage_set(swigCPtr, this, value);
}
public long getEndOfLongMessage() {
return icsneojavaJNI.neomessage_statusbitfield_t_endOfLongMessage_get(swigCPtr, this);
}
public void setLinErrorRXBreakNotZero(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXBreakNotZero_set(swigCPtr, this, value);
}
public long getLinErrorRXBreakNotZero() {
return icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXBreakNotZero_get(swigCPtr, this);
}
public void setLinErrorRXBreakTooShort(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXBreakTooShort_set(swigCPtr, this, value);
}
public long getLinErrorRXBreakTooShort() {
return icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXBreakTooShort_get(swigCPtr, this);
}
public void setLinErrorRXSyncNot55(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXSyncNot55_set(swigCPtr, this, value);
}
public long getLinErrorRXSyncNot55() {
return icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXSyncNot55_get(swigCPtr, this);
}
public void setLinErrorRXDataGreaterEight(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXDataGreaterEight_set(swigCPtr, this, value);
}
public long getLinErrorRXDataGreaterEight() {
return icsneojavaJNI.neomessage_statusbitfield_t_linErrorRXDataGreaterEight_get(swigCPtr, this);
}
public void setLinErrorTXRXMismatch(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linErrorTXRXMismatch_set(swigCPtr, this, value);
}
public long getLinErrorTXRXMismatch() {
return icsneojavaJNI.neomessage_statusbitfield_t_linErrorTXRXMismatch_get(swigCPtr, this);
}
public void setLinErrorMessageIDParity(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linErrorMessageIDParity_set(swigCPtr, this, value);
}
public long getLinErrorMessageIDParity() {
return icsneojavaJNI.neomessage_statusbitfield_t_linErrorMessageIDParity_get(swigCPtr, this);
}
public void setLinSyncFrameError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linSyncFrameError_set(swigCPtr, this, value);
}
public long getLinSyncFrameError() {
return icsneojavaJNI.neomessage_statusbitfield_t_linSyncFrameError_get(swigCPtr, this);
}
public void setLinIDFrameError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linIDFrameError_set(swigCPtr, this, value);
}
public long getLinIDFrameError() {
return icsneojavaJNI.neomessage_statusbitfield_t_linIDFrameError_get(swigCPtr, this);
}
public void setLinSlaveByteError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linSlaveByteError_set(swigCPtr, this, value);
}
public long getLinSlaveByteError() {
return icsneojavaJNI.neomessage_statusbitfield_t_linSlaveByteError_get(swigCPtr, this);
}
public void setRxTimeoutError(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_rxTimeoutError_set(swigCPtr, this, value);
}
public long getRxTimeoutError() {
return icsneojavaJNI.neomessage_statusbitfield_t_rxTimeoutError_get(swigCPtr, this);
}
public void setLinNoSlaveData(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_linNoSlaveData_set(swigCPtr, this, value);
}
public long getLinNoSlaveData() {
return icsneojavaJNI.neomessage_statusbitfield_t_linNoSlaveData_get(swigCPtr, this);
}
public void setCanfdESI(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canfdESI_set(swigCPtr, this, value);
}
public long getCanfdESI() {
return icsneojavaJNI.neomessage_statusbitfield_t_canfdESI_get(swigCPtr, this);
}
public void setCanfdIDE(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canfdIDE_set(swigCPtr, this, value);
}
public long getCanfdIDE() {
return icsneojavaJNI.neomessage_statusbitfield_t_canfdIDE_get(swigCPtr, this);
}
public void setCanfdRTR(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canfdRTR_set(swigCPtr, this, value);
}
public long getCanfdRTR() {
return icsneojavaJNI.neomessage_statusbitfield_t_canfdRTR_get(swigCPtr, this);
}
public void setCanfdFDF(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canfdFDF_set(swigCPtr, this, value);
}
public long getCanfdFDF() {
return icsneojavaJNI.neomessage_statusbitfield_t_canfdFDF_get(swigCPtr, this);
}
public void setCanfdBRS(long value) {
icsneojavaJNI.neomessage_statusbitfield_t_canfdBRS_set(swigCPtr, this, value);
}
public long getCanfdBRS() {
return icsneojavaJNI.neomessage_statusbitfield_t_canfdBRS_get(swigCPtr, this);
}
public void setStatusBitfield(long[] value) {
icsneojavaJNI.neomessage_statusbitfield_t_statusBitfield_set(swigCPtr, this, value);
}
public long[] getStatusBitfield() {
return icsneojavaJNI.neomessage_statusbitfield_t_statusBitfield_get(swigCPtr, this);
}
public neomessage_statusbitfield_t() {
this(icsneojavaJNI.new_neomessage_statusbitfield_t(), true);
}
}

View File

@ -1,115 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class neomessage_t {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected neomessage_t(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(neomessage_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneojavaJNI.delete_neomessage_t(swigCPtr);
}
swigCPtr = 0;
}
}
public void setStatus(neomessage_statusbitfield_t value) {
icsneojavaJNI.neomessage_t_status_set(swigCPtr, this, neomessage_statusbitfield_t.getCPtr(value), value);
}
public neomessage_statusbitfield_t getStatus() {
long cPtr = icsneojavaJNI.neomessage_t_status_get(swigCPtr, this);
return (cPtr == 0) ? null : new neomessage_statusbitfield_t(cPtr, false);
}
public void setTimestamp(java.math.BigInteger value) {
icsneojavaJNI.neomessage_t_timestamp_set(swigCPtr, this, value);
}
public java.math.BigInteger getTimestamp() {
return icsneojavaJNI.neomessage_t_timestamp_get(swigCPtr, this);
}
public void setTimestampReserved(java.math.BigInteger value) {
icsneojavaJNI.neomessage_t_timestampReserved_set(swigCPtr, this, value);
}
public java.math.BigInteger getTimestampReserved() {
return icsneojavaJNI.neomessage_t_timestampReserved_get(swigCPtr, this);
}
public void setData(byte[] value) {
icsneojavaJNI.neomessage_t_data_set(swigCPtr, this, value);
}
public byte[] getData() {
return icsneojavaJNI.neomessage_t_data_get(swigCPtr, this);
}
public void setLength(long value) {
icsneojavaJNI.neomessage_t_length_set(swigCPtr, this, value);
}
public long getLength() {
return icsneojavaJNI.neomessage_t_length_get(swigCPtr, this);
}
public void setHeader(short[] value) {
icsneojavaJNI.neomessage_t_header_set(swigCPtr, this, value);
}
public short[] getHeader() {
return icsneojavaJNI.neomessage_t_header_get(swigCPtr, this);
}
public void setNetid(int value) {
icsneojavaJNI.neomessage_t_netid_set(swigCPtr, this, value);
}
public int getNetid() {
return icsneojavaJNI.neomessage_t_netid_get(swigCPtr, this);
}
public void setType(short value) {
icsneojavaJNI.neomessage_t_type_set(swigCPtr, this, value);
}
public short getType() {
return icsneojavaJNI.neomessage_t_type_get(swigCPtr, this);
}
public void setReserved(short[] value) {
icsneojavaJNI.neomessage_t_reserved_set(swigCPtr, this, value);
}
public short[] getReserved() {
return icsneojavaJNI.neomessage_t_reserved_get(swigCPtr, this);
}
public neomessage_t() {
this(icsneojavaJNI.new_neomessage_t(), true);
}
}

View File

@ -1,98 +0,0 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class neoversion_t {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected neoversion_t(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(neoversion_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
icsneojavaJNI.delete_neoversion_t(swigCPtr);
}
swigCPtr = 0;
}
}
public void setMajor(int value) {
icsneojavaJNI.neoversion_t_major_set(swigCPtr, this, value);
}
public int getMajor() {
return icsneojavaJNI.neoversion_t_major_get(swigCPtr, this);
}
public void setMinor(int value) {
icsneojavaJNI.neoversion_t_minor_set(swigCPtr, this, value);
}
public int getMinor() {
return icsneojavaJNI.neoversion_t_minor_get(swigCPtr, this);
}
public void setPatch(int value) {
icsneojavaJNI.neoversion_t_patch_set(swigCPtr, this, value);
}
public int getPatch() {
return icsneojavaJNI.neoversion_t_patch_get(swigCPtr, this);
}
public void setMetadata(String value) {
icsneojavaJNI.neoversion_t_metadata_set(swigCPtr, this, value);
}
public String getMetadata() {
return icsneojavaJNI.neoversion_t_metadata_get(swigCPtr, this);
}
public void setBuildBranch(String value) {
icsneojavaJNI.neoversion_t_buildBranch_set(swigCPtr, this, value);
}
public String getBuildBranch() {
return icsneojavaJNI.neoversion_t_buildBranch_get(swigCPtr, this);
}
public void setBuildTag(String value) {
icsneojavaJNI.neoversion_t_buildTag_set(swigCPtr, this, value);
}
public String getBuildTag() {
return icsneojavaJNI.neoversion_t_buildTag_get(swigCPtr, this);
}
public void setReserved(String value) {
icsneojavaJNI.neoversion_t_reserved_set(swigCPtr, this, value);
}
public String getReserved() {
return icsneojavaJNI.neoversion_t_reserved_get(swigCPtr, this);
}
public neoversion_t() {
this(icsneojavaJNI.new_neoversion_t(), true);
}
}

View File

@ -110,6 +110,7 @@ public:
ModeNotFound = 0x2054,
AppErrorParsingFailed = 0x2055,
GPTPNotSupported = 0x2056,
SettingNotAvaiableDevice = 0x2057,
// Transport Events
FailedToRead = 0x3000,
@ -186,19 +187,19 @@ public:
APIEvent() : eventStruct({}), serial(), timepoint(), device(nullptr) {}
APIEvent(APIEvent::Type event, APIEvent::Severity severity, const Device* device = nullptr);
const neoevent_t* getNeoEvent() const noexcept { return &eventStruct; }
Type getType() const noexcept { return Type(eventStruct.eventNumber); }
Severity getSeverity() const noexcept { return Severity(eventStruct.severity); }
std::string getDescription() const noexcept { return std::string(eventStruct.description); }
const Device* getDevice() const noexcept { return device; } // Will return nullptr if this is an API-wide event
EventTimePoint getTimestamp() const noexcept { return timepoint; }
void downgradeFromError() noexcept;
bool isForDevice(const Device* forDevice) const noexcept { return forDevice == device; }
bool isForDevice(std::string serial) const noexcept;
// As opposed to getDescription, this will also add text such as "neoVI FIRE 2 CY2468 Error: " to fully describe the problem
std::string describe() const noexcept;
friend std::ostream& operator<<(std::ostream& os, const APIEvent& event) {

View File

@ -7,8 +7,8 @@
namespace icsneo {
class ComponentVersion {
public:
ComponentVersion(uint8_t valid, uint8_t componentInfo, uint32_t identifier, uint32_t dotVersion, uint32_t commitHash) :
valid(valid), componentInfo(componentInfo), identifier(identifier), dotVersion(dotVersion), commitHash(commitHash) {}
ComponentVersion(uint8_t valid, uint8_t componentInfo, uint32_t identifier, uint32_t dotVersion, uint32_t commitHash, uint8_t expansionSlot) :
valid(valid), componentInfo(componentInfo), identifier(identifier), dotVersion(dotVersion), commitHash(commitHash), expansionSlot(expansionSlot) {}
static ComponentVersion FromAppVersion(uint32_t identifier, uint8_t appMajor, uint8_t appMinor) {
uint32_t dotVersion = (appMajor << 24) | (appMinor << 16);
@ -19,6 +19,7 @@ public:
static_cast<uint8_t>(0u),
identifier,
dotVersion,
static_cast<uint8_t>(0u),
static_cast<uint8_t>(0u)
);
}
@ -28,6 +29,7 @@ public:
const uint32_t identifier;
const uint32_t dotVersion;
const uint32_t commitHash;
const uint8_t expansionSlot;
};
class ComponentVersionsMessage : public Message {

View File

@ -0,0 +1,39 @@
#ifndef __EXTENDEDRESPONSEFILTER_H_
#define __EXTENDEDRESPONSEFILTER_H_
#ifdef __cplusplus
#include "icsneo/communication/message/filter/messagefilter.h"
#include "icsneo/communication/network.h"
#include "icsneo/communication/communication.h"
#include "icsneo/communication/command.h"
#include "icsneo/communication/message/extendedresponsemessage.h"
#include <memory>
#include <iostream>
namespace icsneo {
class ExtendedResponseFilter : public MessageFilter {
public:
ExtendedResponseFilter(icsneo::ExtendedResponse resp) : MessageFilter(Message::Type::ExtendedResponse), response(resp) {}
bool match(const std::shared_ptr<Message>& message) const override {
if(!MessageFilter::match(message)) {
return false;
}
const auto respMsg = std::static_pointer_cast<ExtendedResponseMessage>(message);
return respMsg && matchResponse(respMsg->response);
}
private:
icsneo::ExtendedResponse response;
bool matchResponse(icsneo::ExtendedResponse resp) const {
return response == resp;
}
};
}
#endif // __cplusplus
#endif

File diff suppressed because it is too large Load Diff

View File

@ -570,6 +570,7 @@ public:
NODISCARD("If the Lifetime is not held, disconnects will be immediately unsuppressed")
Lifetime suppressDisconnects();
bool refreshComponentVersions();
/**
* For use by extensions only. A more stable API will be provided in the future.
*/
@ -621,7 +622,7 @@ public:
std::optional<bool> SetRootDirectoryEntryFlags(uint8_t mask, uint8_t values, uint32_t collectionEntryByteAddress);
std::shared_ptr<Communication> com;
std::unique_ptr<IDeviceSettings> settings;
std::shared_ptr<IDeviceSettings> settings;
std::optional<size_t> getGenericBinarySize(uint16_t binaryIndex);
bool readBinaryFile(std::ostream& stream, uint16_t binaryIndex);
@ -727,7 +728,9 @@ public:
virtual bool isOnlineSupported() const { return true; }
virtual bool supportsComponentVersions() const { return false; }
virtual bool supportsComponentVersions() const {
return !getComponentVersions().empty();
}
virtual bool supportsTC10() const { return false; }
@ -743,6 +746,8 @@ public:
/* MACsec support */
virtual bool writeMACsecConfig(const MACsecMessage& message, uint16_t binaryIndex);
std::shared_ptr<DeviceExtension> getExtension(const std::string& name) const;
protected:
bool online = false;
int messagePollingCallbackID = 0;
@ -814,8 +819,8 @@ protected:
}
template<typename Settings>
std::unique_ptr<IDeviceSettings> makeSettings(std::shared_ptr<Communication> comm) {
return std::unique_ptr<IDeviceSettings>(new Settings(comm));
std::shared_ptr<IDeviceSettings> makeSettings(std::shared_ptr<Communication> comm) {
return std::make_shared<Settings>(comm);
}
virtual void setupSettings(IDeviceSettings&) {}
@ -824,12 +829,6 @@ protected:
virtual void setupExtensions() {}
// Hook for devices such as FIRE which need to inject traffic before RequestSerialNumber
// Return false to bail
virtual bool afterCommunicationOpen() { return true; }
virtual bool requiresVehiclePower() const { return true; }
template<typename Extension>
std::shared_ptr<Extension> getExtension() const {
std::shared_ptr<Extension> ret;
@ -841,6 +840,12 @@ protected:
return ret;
}
// END Initialization Functions
// Hook for devices such as FIRE which need to inject traffic before RequestSerialNumber
// Return false to bail
virtual bool afterCommunicationOpen() { return true; }
virtual bool requiresVehiclePower() const { return true; }
void handleInternalMessage(std::shared_ptr<Message> message);

View File

@ -28,6 +28,7 @@ public:
virtual void onGoOffline() {}
virtual void onDeviceClose() {}
virtual void setGenericData(void*) {}
virtual bool providesFirmware() const { return false; }
virtual void handleMessage(const std::shared_ptr<Message>&) {}

View File

@ -46,12 +46,12 @@ enum
LISTEN_ALL = 7
};
enum OPEthLinkMode
enum AELinkMode
{
OPETH_LINK_INVALID = -1,
OPETH_LINK_AUTO = 0,
OPETH_LINK_MASTER,
OPETH_LINK_SLAVE
AE_LINK_INVALID = -1,
AE_LINK_AUTO = 0,
AE_LINK_MASTER,
AE_LINK_SLAVE
};
enum EthLinkSpeed
@ -59,6 +59,9 @@ enum EthLinkSpeed
ETH_SPEED_10 = 0,
ETH_SPEED_100,
ETH_SPEED_1000,
ETH_SPEED_2500,
ETH_SPEED_5000,
ETH_SPEED_10000,
};
typedef struct
@ -67,7 +70,7 @@ typedef struct
uint8_t linkStatus;
uint8_t linkFullDuplex;
uint8_t linkSpeed; // see EthLinkSpeed
int8_t linkMode; // for automotive networks - see OPEthLinkMode
int8_t linkMode; // for automotive networks - see AELinkMode
} EthernetNetworkStatus;
typedef struct
@ -121,7 +124,7 @@ typedef struct ETHERNET_SETTINGS_t
} ETHERNET_SETTINGS;
#define ETHERNET_SETTINGS_SIZE 8
typedef struct OP_ETH_GENERAL_SETTINGS_t
typedef struct AE_GENERAL_SETTINGS_t
{
uint8_t ucInterfaceType;
uint8_t reserved0[3];
@ -140,15 +143,15 @@ typedef struct OP_ETH_GENERAL_SETTINGS_t
} flags;
unsigned uFlags;
};
} OP_ETH_GENERAL_SETTINGS;
#define OP_ETH_GENERAL_SETTINGS_SIZE 20
static_assert(sizeof(OP_ETH_GENERAL_SETTINGS) == OP_ETH_GENERAL_SETTINGS_SIZE, "OP_ETH_GENERAL_SETTINGS is the wrong size!");
} AE_GENERAL_SETTINGS;
#define AE_GENERAL_SETTINGS_SIZE 20
static_assert(sizeof(AE_GENERAL_SETTINGS) == AE_GENERAL_SETTINGS_SIZE, "AE_GENERAL_SETTINGS is the wrong size!");
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4201) // nameless struct/union
#endif
typedef struct OP_ETH_SETTINGS_t
typedef struct AE_SETTINGS_t
{
uint8_t ucConfigMode;
unsigned char preemption_en;
@ -165,9 +168,9 @@ typedef struct OP_ETH_SETTINGS_t
};
unsigned char reserved0[14];
};
} OP_ETH_SETTINGS;
#define OP_ETH_SETTINGS_SIZE 16
static_assert(sizeof(OP_ETH_SETTINGS) == OP_ETH_SETTINGS_SIZE, "OP_ETH_SETTINGS is the wrong size!");
} AE_SETTINGS;
#define AE_SETTINGS_SIZE 16
static_assert(sizeof(AE_SETTINGS) == AE_SETTINGS_SIZE, "AE_SETTINGS is the wrong size!");
#ifdef _MSC_VER
#pragma warning(pop)
#endif
@ -851,6 +854,38 @@ public:
*/
bool setLINCommanderResponseTimeFor(Network net, uint8_t bits);
virtual bool setPhyMode(uint8_t index, AELinkMode mode) {
(void)index, (void)mode;
return false;
}
virtual bool setPhyEnable(uint8_t index, bool enable) {
(void)index, (void)enable;
return false;
}
virtual bool setPhySpeed(uint8_t index, EthLinkSpeed speed) {
(void)index, (void)speed;
return false;
}
virtual std::optional<AELinkMode> getPhyMode(uint8_t index) {
(void)index;
report(APIEvent::Type::SettingNotAvaiableDevice, APIEvent::Severity::EventWarning);
return std::nullopt;
}
virtual std::optional<bool> getPhyEnable(uint8_t index) {
(void)index;
report(APIEvent::Type::SettingNotAvaiableDevice, APIEvent::Severity::EventWarning);
return std::nullopt;
}
virtual std::optional<EthLinkSpeed> getPhySpeed(uint8_t index) {
(void)index;
report(APIEvent::Type::SettingNotAvaiableDevice, APIEvent::Severity::EventWarning);
return std::nullopt;
}
const void* getRawStructurePointer() const { return settingsInDeviceRAM.data(); }
void* getMutableRawStructurePointer() { return settings.data(); }
template<typename T> const T* getStructurePointer() const { return reinterpret_cast<const T*>(getRawStructurePointer()); }

View File

@ -19,15 +19,13 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::LIN,
Network::NetID::OP_Ethernet1
Network::NetID::DWCAN_01,
Network::NetID::LIN_01,
Network::NetID::AE_01
};
return supportedNetworks;
}
bool supportsComponentVersions() const override { return true; }
protected:
EtherBADGE(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<EtherBADGESettings>(makeDriver);

View File

@ -71,7 +71,7 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
default:
return nullptr;
@ -82,7 +82,7 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
default:
return nullptr;
@ -93,7 +93,7 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
default:
return nullptr;

View File

@ -16,8 +16,8 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::HSCAN2
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_02
};
return supportedNetworks;
}

View File

@ -16,8 +16,8 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::HSCAN2
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_02
};
return supportedNetworks;
}

View File

@ -17,19 +17,19 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::MSCAN,
Network::NetID::HSCAN2,
Network::NetID::HSCAN3,
Network::NetID::HSCAN4,
Network::NetID::HSCAN5,
Network::NetID::HSCAN6,
Network::NetID::HSCAN7,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::DWCAN_05,
Network::NetID::DWCAN_06,
Network::NetID::DWCAN_07,
Network::NetID::Ethernet,
Network::NetID::ETHERNET_01,
Network::NetID::LIN,
Network::NetID::LIN2
Network::NetID::LIN_01,
Network::NetID::LIN_02
};
return supportedNetworks;
}
@ -69,7 +69,6 @@ protected:
return 0;
}
bool supportsComponentVersions() const override { return true; }
bool supportsGPTP() const override { return true; }
};

View File

@ -94,21 +94,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can2);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->can3);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->can4);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->can5);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->can6);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->can7);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->can8);
default:
return nullptr;
@ -119,21 +119,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->canfd2);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->canfd3);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->canfd4);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->canfd5);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->canfd6);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->canfd7);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->canfd8);
default:
return nullptr;
@ -144,9 +144,9 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
case Network::NetID::LIN2:
case Network::NetID::LIN_02:
return &(cfg->lin2);
default:
return nullptr;

View File

@ -16,19 +16,19 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::MSCAN,
Network::NetID::HSCAN2,
Network::NetID::HSCAN3,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::LSFTCAN,
Network::NetID::LSFTCAN_01,
Network::NetID::SWCAN,
Network::NetID::SWCAN_01,
Network::NetID::LIN,
Network::NetID::LIN2,
Network::NetID::LIN3,
Network::NetID::LIN4
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04
};
return supportedNetworks;
}

View File

@ -105,15 +105,15 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->can2);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can3);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->can4);
case Network::NetID::LSFTCAN:
case Network::NetID::LSFTCAN_01:
return &(cfg->lsftcan);
default:
return nullptr;
@ -125,7 +125,7 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::SWCAN:
case Network::NetID::SWCAN_01:
return &(cfg->swcan);
default:
return nullptr;
@ -136,13 +136,13 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
case Network::NetID::LIN2:
case Network::NetID::LIN_02:
return &(cfg->lin2);
case Network::NetID::LIN3:
case Network::NetID::LIN_03:
return &(cfg->lin3);
case Network::NetID::LIN4:
case Network::NetID::LIN_04:
return &(cfg->lin4);
default:
return nullptr;

View File

@ -23,32 +23,32 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::MSCAN,
Network::NetID::HSCAN2,
Network::NetID::HSCAN3,
Network::NetID::HSCAN4,
Network::NetID::HSCAN5,
Network::NetID::HSCAN6,
Network::NetID::HSCAN7,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::DWCAN_05,
Network::NetID::DWCAN_06,
Network::NetID::DWCAN_07,
Network::NetID::LSFTCAN,
Network::NetID::LSFTCAN2,
Network::NetID::LSFTCAN_01,
Network::NetID::LSFTCAN_02,
Network::NetID::SWCAN,
Network::NetID::SWCAN2,
Network::NetID::SWCAN_01,
Network::NetID::SWCAN_02,
Network::NetID::Ethernet,
Network::NetID::ETHERNET_01,
Network::NetID::LIN,
Network::NetID::LIN2,
Network::NetID::LIN3,
Network::NetID::LIN4,
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04,
Network::NetID::ISO9141,
Network::NetID::ISO9141_2,
Network::NetID::ISO9141_3,
Network::NetID::ISO9141_4
Network::NetID::ISO9141_01,
Network::NetID::ISO9141_02,
Network::NetID::ISO9141_03,
Network::NetID::ISO9141_04
};
return supportedNetworks;
}
@ -87,8 +87,6 @@ public:
};
}
bool supportsComponentVersions() const override { return true; }
protected:
NeoVIFIRE2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE2Settings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -81,7 +81,7 @@ typedef struct {
uint16_t idle_wakeup_network_enables_1;
uint16_t idle_wakeup_network_enables_2;
/* reserved for HSCAN6/7, LSFT2, etc.. */
/* reserved for DWCAN_06/7, LSFT2, etc.. */
uint16_t network_enables_3;
uint16_t idle_wakeup_network_enables_3;
@ -128,25 +128,25 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->can2);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can3);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->can4);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->can5);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->can6);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->can7);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->can8);
case Network::NetID::LSFTCAN:
case Network::NetID::LSFTCAN_01:
return &(cfg->lsftcan1);
case Network::NetID::LSFTCAN2:
case Network::NetID::LSFTCAN_02:
return &(cfg->lsftcan2);
default:
return nullptr;
@ -157,21 +157,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->canfd2);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->canfd3);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->canfd4);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->canfd5);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->canfd6);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->canfd7);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->canfd8);
default:
return nullptr;
@ -183,9 +183,9 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::SWCAN:
case Network::NetID::SWCAN_01:
return &(cfg->swcan1);
case Network::NetID::SWCAN2:
case Network::NetID::SWCAN_02:
return &(cfg->swcan2);
default:
return nullptr;
@ -195,16 +195,16 @@ public:
virtual std::vector<TerminationGroup> getTerminationGroups() const override {
return {
{
Network(Network::NetID::HSCAN),
Network(Network::NetID::HSCAN3),
Network(Network::NetID::HSCAN5),
Network(Network::NetID::HSCAN7)
Network(Network::NetID::DWCAN_01),
Network(Network::NetID::DWCAN_03),
Network(Network::NetID::DWCAN_05),
Network(Network::NetID::DWCAN_07)
},
{
Network(Network::NetID::MSCAN),
Network(Network::NetID::HSCAN2),
Network(Network::NetID::HSCAN4),
Network(Network::NetID::HSCAN6)
Network(Network::NetID::DWCAN_08),
Network(Network::NetID::DWCAN_02),
Network(Network::NetID::DWCAN_04),
Network(Network::NetID::DWCAN_06)
}
};
}
@ -214,17 +214,17 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
case Network::NetID::LIN2:
case Network::NetID::LIN_02:
return &(cfg->lin2);
case Network::NetID::LIN3:
case Network::NetID::LIN_03:
return &(cfg->lin3);
case Network::NetID::LIN4:
case Network::NetID::LIN_04:
return &(cfg->lin4);
case Network::NetID::LIN5:
case Network::NetID::LIN_05:
return &(cfg->lin5);
case Network::NetID::LIN6:
case Network::NetID::LIN_06:
return &(cfg->lin6);
default:
return nullptr;

View File

@ -17,41 +17,38 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::MSCAN,
Network::NetID::HSCAN2,
Network::NetID::HSCAN3,
Network::NetID::HSCAN4,
Network::NetID::HSCAN5,
Network::NetID::HSCAN6,
Network::NetID::HSCAN7,
Network::NetID::DWCAN9,
Network::NetID::DWCAN10,
Network::NetID::DWCAN11,
Network::NetID::DWCAN12,
Network::NetID::DWCAN13,
Network::NetID::DWCAN14,
Network::NetID::DWCAN15,
Network::NetID::DWCAN16,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::DWCAN_05,
Network::NetID::DWCAN_06,
Network::NetID::DWCAN_07,
Network::NetID::DWCAN_09,
Network::NetID::DWCAN_10,
Network::NetID::DWCAN_11,
Network::NetID::DWCAN_12,
Network::NetID::DWCAN_13,
Network::NetID::DWCAN_14,
Network::NetID::DWCAN_15,
Network::NetID::DWCAN_16,
Network::NetID::Ethernet,
Network::NetID::Ethernet2,
Network::NetID::Ethernet3,
Network::NetID::ETHERNET_01,
Network::NetID::ETHERNET_02,
Network::NetID::ETHERNET_03,
Network::NetID::LIN,
Network::NetID::LIN2,
Network::NetID::LIN3,
Network::NetID::LIN4,
Network::NetID::LIN5,
Network::NetID::LIN6,
Network::NetID::LIN7,
Network::NetID::LIN8,
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04,
Network::NetID::LIN_05,
Network::NetID::LIN_06,
Network::NetID::LIN_07,
Network::NetID::LIN_08,
};
return supportedNetworks;
}
bool supportsComponentVersions() const override { return true; }
protected:
NeoVIFIRE3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE3Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -166,21 +166,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->can2);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can3);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->can4);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->can5);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->can6);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->can7);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->can8);
default:
return nullptr;
@ -191,21 +191,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->canfd2);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->canfd3);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->canfd4);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->canfd5);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->canfd6);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->canfd7);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->canfd8);
default:
return nullptr;
@ -215,16 +215,16 @@ public:
virtual std::vector<TerminationGroup> getTerminationGroups() const override {
return {
{
Network(Network::NetID::HSCAN),
Network(Network::NetID::HSCAN3),
Network(Network::NetID::HSCAN5),
Network(Network::NetID::HSCAN7)
Network(Network::NetID::DWCAN_01),
Network(Network::NetID::DWCAN_03),
Network(Network::NetID::DWCAN_05),
Network(Network::NetID::DWCAN_07)
},
{
Network(Network::NetID::MSCAN),
Network(Network::NetID::HSCAN2),
Network(Network::NetID::HSCAN4),
Network(Network::NetID::HSCAN6)
Network(Network::NetID::DWCAN_08),
Network(Network::NetID::DWCAN_02),
Network(Network::NetID::DWCAN_04),
Network(Network::NetID::DWCAN_06)
}
};
}
@ -234,21 +234,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
case Network::NetID::LIN2:
case Network::NetID::LIN_02:
return &(cfg->lin2);
case Network::NetID::LIN3:
case Network::NetID::LIN_03:
return &(cfg->lin3);
case Network::NetID::LIN4:
case Network::NetID::LIN_04:
return &(cfg->lin4);
case Network::NetID::LIN5:
case Network::NetID::LIN_05:
return &(cfg->lin5);
case Network::NetID::LIN6:
case Network::NetID::LIN_06:
return &(cfg->lin6);
case Network::NetID::LIN7:
case Network::NetID::LIN_07:
return &(cfg->lin7);
case Network::NetID::LIN8:
case Network::NetID::LIN_08:
return &(cfg->lin8);
default:
return nullptr;

View File

@ -17,43 +17,41 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::MSCAN,
Network::NetID::HSCAN2,
Network::NetID::HSCAN3,
Network::NetID::HSCAN4,
Network::NetID::HSCAN5,
Network::NetID::HSCAN6,
Network::NetID::HSCAN7,
Network::NetID::DWCAN9,
Network::NetID::DWCAN10,
Network::NetID::DWCAN11,
Network::NetID::DWCAN12,
Network::NetID::DWCAN13,
Network::NetID::DWCAN14,
Network::NetID::DWCAN15,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::DWCAN_05,
Network::NetID::DWCAN_06,
Network::NetID::DWCAN_07,
Network::NetID::DWCAN_09,
Network::NetID::DWCAN_10,
Network::NetID::DWCAN_11,
Network::NetID::DWCAN_12,
Network::NetID::DWCAN_13,
Network::NetID::DWCAN_14,
Network::NetID::DWCAN_15,
Network::NetID::Ethernet,
Network::NetID::Ethernet2,
Network::NetID::Ethernet3,
Network::NetID::ETHERNET_01,
Network::NetID::ETHERNET_02,
Network::NetID::ETHERNET_03,
Network::NetID::LIN,
Network::NetID::LIN2,
Network::NetID::LIN3,
Network::NetID::LIN4,
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04,
Network::NetID::FlexRay,
Network::NetID::FlexRay1a,
Network::NetID::FlexRay1b,
Network::NetID::FlexRay2,
Network::NetID::FlexRay2a,
Network::NetID::FlexRay2b,
Network::NetID::FLEXRAY_01,
Network::NetID::FLEXRAY_01A,
Network::NetID::FLEXRAY_01B,
Network::NetID::FLEXRAY_02,
Network::NetID::FLEXRAY_02A,
Network::NetID::FLEXRAY_02B,
};
return supportedNetworks;
}
bool supportsComponentVersions() const override { return true; }
protected:
NeoVIFIRE3FlexRay(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE3FlexRaySettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -149,21 +149,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->can2);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can3);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->can4);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->can5);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->can6);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->can7);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->can8);
default:
return nullptr;
@ -174,21 +174,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->canfd2);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->canfd3);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->canfd4);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->canfd5);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->canfd6);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->canfd7);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->canfd8);
default:
return nullptr;
@ -198,16 +198,16 @@ public:
virtual std::vector<TerminationGroup> getTerminationGroups() const override {
return {
{
Network(Network::NetID::HSCAN),
Network(Network::NetID::HSCAN3),
Network(Network::NetID::HSCAN5),
Network(Network::NetID::HSCAN7)
Network(Network::NetID::DWCAN_01),
Network(Network::NetID::DWCAN_03),
Network(Network::NetID::DWCAN_05),
Network(Network::NetID::DWCAN_07)
},
{
Network(Network::NetID::MSCAN),
Network(Network::NetID::HSCAN2),
Network(Network::NetID::HSCAN4),
Network(Network::NetID::HSCAN6)
Network(Network::NetID::DWCAN_08),
Network(Network::NetID::DWCAN_02),
Network(Network::NetID::DWCAN_04),
Network(Network::NetID::DWCAN_06)
}
};
}
@ -217,13 +217,13 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
case Network::NetID::LIN2:
case Network::NetID::LIN_02:
return &(cfg->lin2);
case Network::NetID::LIN3:
case Network::NetID::LIN_03:
return &(cfg->lin3);
case Network::NetID::LIN4:
case Network::NetID::LIN_04:
return &(cfg->lin4);
default:
return nullptr;

View File

@ -17,25 +17,24 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::MSCAN,
Network::NetID::HSCAN2,
Network::NetID::HSCAN3,
Network::NetID::HSCAN4,
Network::NetID::HSCAN5,
Network::NetID::HSCAN6,
Network::NetID::HSCAN7,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::DWCAN_05,
Network::NetID::DWCAN_06,
Network::NetID::DWCAN_07,
Network::NetID::Ethernet,
Network::NetID::Ethernet2,
Network::NetID::ETHERNET_01,
Network::NetID::ETHERNET_02,
Network::NetID::LIN,
Network::NetID::LIN2
Network::NetID::LIN_01,
Network::NetID::LIN_02
};
return supportedNetworks;
}
bool supportsComponentVersions() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:

View File

@ -107,21 +107,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can2);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->can3);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->can4);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->can5);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->can6);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->can7);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->can8);
default:
return nullptr;
@ -132,21 +132,21 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->canfd2);
case Network::NetID::HSCAN3:
case Network::NetID::DWCAN_03:
return &(cfg->canfd3);
case Network::NetID::HSCAN4:
case Network::NetID::DWCAN_04:
return &(cfg->canfd4);
case Network::NetID::HSCAN5:
case Network::NetID::DWCAN_05:
return &(cfg->canfd5);
case Network::NetID::HSCAN6:
case Network::NetID::DWCAN_06:
return &(cfg->canfd6);
case Network::NetID::HSCAN7:
case Network::NetID::DWCAN_07:
return &(cfg->canfd7);
case Network::NetID::MSCAN:
case Network::NetID::DWCAN_08:
return &(cfg->canfd8);
default:
return nullptr;
@ -156,16 +156,16 @@ public:
virtual std::vector<TerminationGroup> getTerminationGroups() const override {
return {
{
Network(Network::NetID::HSCAN),
Network(Network::NetID::HSCAN3),
Network(Network::NetID::HSCAN5),
Network(Network::NetID::HSCAN7)
Network(Network::NetID::DWCAN_01),
Network(Network::NetID::DWCAN_03),
Network(Network::NetID::DWCAN_05),
Network(Network::NetID::DWCAN_07)
},
{
Network(Network::NetID::MSCAN),
Network(Network::NetID::HSCAN2),
Network(Network::NetID::HSCAN4),
Network(Network::NetID::HSCAN6)
Network(Network::NetID::DWCAN_08),
Network(Network::NetID::DWCAN_02),
Network(Network::NetID::DWCAN_04),
Network(Network::NetID::DWCAN_06)
}
};
}
@ -175,9 +175,9 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
case Network::NetID::LIN2:
case Network::NetID::LIN_02:
return &(cfg->lin2);
default:
return nullptr;

View File

@ -15,8 +15,6 @@ public:
// USB PID is 0x0901, standard driver is FTDI
ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIION, DeviceType::ION, 0x0901);
bool supportsComponentVersions() const override { return true; }
private:
NeoVIION(neodevice_t neodevice, const driver_factory_t& makeDriver) : Plasion(neodevice) {
initialize<NullSettings, Disk::PlasionDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);

View File

@ -13,29 +13,29 @@ class Plasion : public Device {
public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::MSCAN,
Network::NetID::HSCAN2,
Network::NetID::HSCAN3,
Network::NetID::HSCAN4,
Network::NetID::HSCAN5,
Network::NetID::HSCAN6,
Network::NetID::HSCAN7,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::DWCAN_05,
Network::NetID::DWCAN_06,
Network::NetID::DWCAN_07,
Network::NetID::LSFTCAN,
Network::NetID::LSFTCAN2,
Network::NetID::LSFTCAN_01,
Network::NetID::LSFTCAN_02,
Network::NetID::SWCAN,
Network::NetID::SWCAN2,
Network::NetID::SWCAN_01,
Network::NetID::SWCAN_02,
Network::NetID::Ethernet,
Network::NetID::ETHERNET_01,
Network::NetID::LIN,
Network::NetID::LIN2,
Network::NetID::LIN3,
Network::NetID::LIN4,
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04,
Network::NetID::FlexRay
Network::NetID::FLEXRAY_01
};
return supportedNetworks;
}
@ -51,8 +51,8 @@ protected:
virtual bool isSupportedTXNetwork(const Network&) const override { return true; }
virtual void setupExtensions() override {
std::vector<Network> flexRayControllers;
flexRayControllers.push_back(Network::NetID::FlexRay);
flexRayControllers.push_back(Network::NetID::FlexRay); // TODO Becomes FlexRay2 if not in coldstart mode
flexRayControllers.push_back(Network::NetID::FLEXRAY_01);
flexRayControllers.push_back(Network::NetID::FLEXRAY_01); // TODO Becomes FlexRay2 if not in coldstart mode
addExtension(std::make_shared<FlexRay::Extension>(*this, flexRayControllers));
}

View File

@ -21,20 +21,20 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::HSCAN2,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_02,
Network::NetID::Ethernet,
Network::NetID::ETHERNET_01,
Network::NetID::LIN,
Network::NetID::LIN_01,
Network::NetID::A2B1,
Network::NetID::A2B2,
Network::NetID::A2B_01,
Network::NetID::A2B_02,
Network::NetID::I2C,
Network::NetID::I2C2,
Network::NetID::I2C_01,
Network::NetID::I2C_02,
Network::NetID::MDIO1,
Network::NetID::MDIO_01,
};
return supportedNetworks;
}

View File

@ -104,9 +104,9 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can2);
default:
return nullptr;
@ -117,9 +117,9 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->canfd2);
default:
return nullptr;
@ -131,7 +131,7 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN:
case Network::NetID::LIN_01:
return &(cfg->lin1);
default:
return nullptr;

View File

@ -22,8 +22,8 @@ public:
const std::vector<Network>& GetSupportedNetworks() override {
static std::vector<Network> supportedNetworks = RADCometBase::GetSupportedNetworks();
supportedNetworks.push_back(Network::NetID::OP_Ethernet3);
supportedNetworks.push_back(Network::NetID::MDIO4);
supportedNetworks.push_back(Network::NetID::AE_03);
supportedNetworks.push_back(Network::NetID::MDIO_04);
return supportedNetworks;
}

View File

@ -12,20 +12,20 @@ class RADCometBase : public Device {
public:
virtual const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::HSCAN2,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_02,
Network::NetID::Ethernet,
Network::NetID::ETHERNET_01,
Network::NetID::OP_Ethernet1,
Network::NetID::OP_Ethernet2,
Network::NetID::AE_01,
Network::NetID::AE_02,
Network::NetID::LIN,
Network::NetID::ISO9141,
Network::NetID::LIN_01,
Network::NetID::ISO9141_01,
Network::NetID::MDIO1,
Network::NetID::MDIO2,
Network::NetID::MDIO3,
Network::NetID::MDIO_01,
Network::NetID::MDIO_02,
Network::NetID::MDIO_03,
};
return supportedNetworks;
}

View File

@ -59,10 +59,10 @@ typedef struct {
// Ethernet 10/100/1000
ETHERNET_SETTINGS2 ethernet;
// Ethernet General
OP_ETH_GENERAL_SETTINGS opEthGen;
AE_GENERAL_SETTINGS aeGen;
// 100/1000T1
ETHERNET_SETTINGS2 ethT1;
OP_ETH_SETTINGS opEth1;
AE_SETTINGS ae_01;
// 10T1S
ETHERNET_SETTINGS2 ethT1s1;
ETHERNET10T1S_SETTINGS t1s1;
@ -95,9 +95,9 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->can2);
default:
return nullptr;
@ -108,9 +108,9 @@ public:
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::HSCAN:
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::HSCAN2:
case Network::NetID::DWCAN_02:
return &(cfg->canfd2);
default:
return nullptr;

View File

@ -18,24 +18,24 @@ public:
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::HSCAN,
Network::NetID::HSCAN2,
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_02,
Network::NetID::Ethernet,
Network::NetID::ETHERNET_01,
Network::NetID::OP_Ethernet1,
Network::NetID::OP_Ethernet2,
Network::NetID::OP_Ethernet3,
Network::NetID::OP_Ethernet4,
Network::NetID::OP_Ethernet5,
Network::NetID::OP_Ethernet6,
Network::NetID::OP_Ethernet7,
Network::NetID::AE_01,
Network::NetID::AE_02,
Network::NetID::AE_03,
Network::NetID::AE_04,
Network::NetID::AE_05,
Network::NetID::AE_06,
Network::NetID::AE_07,
Network::NetID::LIN,
Network::NetID::ISO9141,
Network::NetID::LIN_01,
Network::NetID::ISO9141_01,
Network::NetID::MDIO1,
Network::NetID::MDIO2,
Network::NetID::MDIO_01,
Network::NetID::MDIO_02,
};
return supportedNetworks;
}

Some files were not shown because too many files have changed in this diff Show More