Move examples into tree

See history at https://github.com/intrepidcs/libicsneo-examples/tree/v0.2.0-dev
This commit is contained in:
Paul Hollinsky
2020-08-06 15:41:48 -04:00
parent 2079037ae4
commit f49f65c3ed
54 changed files with 20217 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
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)
+520
View File
@@ -0,0 +1,520 @@
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;
}
}
}
}
}
+8
View File
@@ -0,0 +1,8 @@
namespace libicsneocsharp_example {
class Program {
static void Main(string[] args) {
InteractiveExample example = new InteractiveExample();
example.Run();
}
}
}
+57
View File
@@ -0,0 +1,57 @@
# 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.
+26
View File
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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;
}
}
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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;
}
}
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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;
}
}
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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;
}
}
+26
View File
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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;
}
}
+76
View File
@@ -0,0 +1,76 @@
%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
+426
View File
@@ -0,0 +1,426 @@
//------------------------------------------------------------------------------
// <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_ISOPIC = icsneocsharpPINVOKE.ICSNEO_NETID_ISOPIC_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
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>libicsneocsharp_example</RootNamespace>
</PropertyGroup>
</Project>
@@ -0,0 +1,25 @@
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
+90
View File
@@ -0,0 +1,90 @@
//------------------------------------------------------------------------------
// <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) {
}
}
+112
View File
@@ -0,0 +1,112 @@
//------------------------------------------------------------------------------
// <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) {
}
}
+155
View File
@@ -0,0 +1,155 @@
//------------------------------------------------------------------------------
// <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) {
}
}
+156
View File
@@ -0,0 +1,156 @@
//------------------------------------------------------------------------------
// <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) {
}
}
@@ -0,0 +1,610 @@
//------------------------------------------------------------------------------
// <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) {
}
}
+146
View File
@@ -0,0 +1,146 @@
//------------------------------------------------------------------------------
// <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) {
}
}
+119
View File
@@ -0,0 +1,119 @@
//------------------------------------------------------------------------------
// <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) {
}
}