Expand description
Rust sys level crate providing a cbindgen API for libicsneo (https://github.com/intrepidcs/libicsneo) If unsure, don’t use this crate and use libicsneo-rs instead.
Re-exports§
pub use self::_neoio_t as neoio_t;
Structs§
- __
Bindgen Bitfield Unit - neodevice_
t - neoevent_
t - neomessage_
can_ error_ t - neomessage_
can_ t - neomessage_
eth_ t - neomessage_
frame_ t - neomessage_
lin_ t - neomessage_
linstatus_ t - neomessage_
statusbitfield_ t__ bindgen_ ty_ 1 - neomessage_
statusbitfield_ t__ bindgen_ ty_ 1__ bindgen_ ty_ 1__ bindgen_ ty_ 1 - neomessage_
statusbitfield_ t__ bindgen_ ty_ 1__ bindgen_ ty_ 1__ bindgen_ ty_ 2 - neomessage_
t - neoversion_
t
Enums§
Functions§
- icsneo_
addEvent ⚠Callback - \brief Adds an event callback to be called when a new event is added. \param[in] callback A function pointer with void return type and a single neoevent_t parameter. \param[in] filter Unused for now. Exists as a placeholder here for future backwards-compatibility. \returns The id of the callback added. Does not error.
- icsneo_
addMessage ⚠Callback - \brief Adds a message callback to the specified device to be called when a new message is received. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] callback A function pointer with void return type and a single neomessage_t parameter. \param[in] filter Unused for now. Exists as a placeholder here for future backwards-compatibility. \returns The id of the callback added, or -1 if the operation failed.
- icsneo_
canTermination ⚠BeEnabled For - \brief Check whether software switchable termination can currently be enabled for a given network. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network ID to check \returns True if software switchable termination can currently be enabled
- icsneo_
close ⚠Device - \brief Close an open connection to the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to close. \returns True if the connection could be closed.
- icsneo_
describe ⚠Device - \brief Get the friendly description for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[out] str A pointer to a buffer where the string will be written. NULL can be passed, which will write a character count to maxLength. \param[inout] maxLength A pointer to a size_t which, prior to the call, holds the maximum number of characters to be written (so str must be of size maxLength + 1 to account for the NULL terminator), and after the call holds the number of characters written. \returns True if str was written to
- icsneo_
disable ⚠Message Polling - \brief Disable buffering of messages for the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if polling could be disabled.
- icsneo_
discard ⚠AllEvents - \brief Discard all events which have occurred in API operation. Does NOT discard any errors.
- icsneo_
discard ⚠Device Events - \brief Discard all events which have occurred in API operation. \param[in] device A pointer to the neodevice_t structure specifying the device to discard events for. NULL can be passed, which indicates that ONLY events not associated with a device are desired (API events). Does NOT discard any errors (device or otherwise).
- icsneo_
enable ⚠Message Polling - \brief Enable buffering of messages for the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if polling could be enabled.
- icsneo_
find ⚠AllDevices - \brief Find Intrepid hardware connected via USB and Ethernet. \param[out] devices Pointer to memory where devices should be written. If NULL, the current number of detected devices is written to count. \param[inout] count Pointer to a size_t, which should initially contain the number of devices the buffer can hold, and will afterwards contain the number of devices found.
- icsneo_
free ⚠Unconnected Devices - \brief Invalidate neodevice_t objects which have not been opened.
- icsneo_
getBaudrate ⚠ - \brief Get the network baudrate for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network for which the baudrate should be retrieved. \returns The value in baud with no multipliers. (i.e. 500k becomes 500000) A negative value is returned if an error occurs.
- icsneo_
getDevice ⚠Events - \brief Read out events which have occurred in API operation for a specific device \param[in] device A pointer to the neodevice_t structure specifying the device to read out events for. NULL can be passed, which indicates that ONLY events not associated with a device are desired (API events). \param[out] events A pointer to a buffer which neoevent_t structures will be written to. NULL can be passed, which will write the current event count to size. \param[inout] size A pointer to a size_t which, prior to the call, holds the maximum number of events to be written, and after the call holds the number of events written. \returns True if the events were read out successfully (even if there were no events to report).
- icsneo_
getDevice ⚠Status - \brief Return the device status structures for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] status A pointer to a device status structure for the current device. \param[in] size The size of the current device status structure in bytes. \returns True if the device status was successfully read.
- icsneo_
getDigitalIO ⚠ - \brief Get the value of a digital IO for the given device \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] type The IO type \param[in] number The index within the IO type, starting from 1 \param[out] value A pointer to the uint8_t which will store the value of the IO port, if successful \returns True if the value is read successfully
- icsneo_
getEvent ⚠Limit - \brief Get the number of events which can be held in the API managed buffer \returns The current limit.
- icsneo_
getEvents ⚠ - \brief Read out events which have occurred in API operation \param[out] events A pointer to a buffer which neoevent_t structures will be written to. NULL can be passed, which will write the current event count to size. \param[inout] size A pointer to a size_t which, prior to the call, holds the maximum number of events to be written, and after the call holds the number of events written. \returns True if the events were read out successfully (even if there were no events to report).
- icsneo_
getFD ⚠Baudrate - \brief Get the CAN FD baudrate for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network for which the baudrate should be retrieved. \returns The value in baud with no multipliers. (i.e. 500k becomes 500000) A negative value is returned if an error occurs.
- icsneo_
getLast ⚠Error - \brief Read out the last error which occurred in API operation on this thread. \param[out] error A pointer to a buffer which a neoevent_t structure will be written to. \returns True if an error was read out.
- icsneo_
getMessages ⚠ - \brief Read out messages which have been recieved \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[out] messages A pointer to a buffer which neomessage_t structures will be written to. NULL can be passed, which will write the current message count to size. \param[inout] items A pointer to a size_t which, prior to the call, holds the maximum number of messages to be written, and after the call holds the number of messages written. \param[in] timeout The number of milliseconds to wait for a message to arrive. A value of 0 indicates a non-blocking call. Querying for the current message count is always asynchronous and ignores this value. \returns True if the messages were read out successfully (even if there were no messages to read) or if the count was read successfully.
- icsneo_
getNetwork ⚠ByNumber - \brief Get the network ID for the nth network of a specified type on this device \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] type An ICSNEO_NETWORK_TYPE_* constant denoting the network type \param[in] number The number of this network starting from 1 \returns The netid if the call succeeds, ICSNEO_NETID_INVALID otherwise
- icsneo_
getPolling ⚠Message Limit - \brief Get the maximum number of messages which will be held in the API managed buffer for the specified hardware. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns Number of messages, or -1 if device is invalid.
- icsneo_
getProduct ⚠Name - \brief Get the friendly product name for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[out] str A pointer to a buffer where the string will be written. NULL can be passed, which will write a character count to maxLength. \param[inout] maxLength A pointer to a size_t which, prior to the call, holds the maximum number of characters to be written (so str must be of size maxLength + 1 to account for the NULL terminator), and after the call holds the number of characters written. \returns True if str was written to
- icsneo_
getProduct ⚠Name ForType - \brief Get the friendly product name for a specified devicetype. \param[in] type A neodevice_t structure specifying the device to operate on. \param[out] str A pointer to a buffer where the string will be written. NULL can be passed, which will write a character count to maxLength. \param[inout] maxLength A pointer to a size_t which, prior to the call, holds the maximum number of characters to be written (so str must be of size maxLength + 1 to account for the NULL terminator), and after the call holds the number of characters written. \returns True if str was written to
- icsneo_
getRTC ⚠ - \brief Get the real-time clock for the given device. \param[out] device A pointer to the neodevice_t structure specifying the device to read the RTC from. \param[out] output A pointer to a uint64_t where the RTC will be stored. This value is in seconds.
- icsneo_
getSupported ⚠Devices - \brief Get the devices supported by the current version of the API \param[out] devices A pointer to a buffer of devicetype_t structures which will be written to. NULL can be passed, which will write the current supported device count to count. \param[inout] count A pointer to a size_t which, prior to the call, holds the maximum number of devicetype_t structures to be written, and after the call holds the number of devicetype_t structures written. \returns True if devices was written to
- icsneo_
getTimestamp ⚠Resolution - \brief Get the timestamp resolution for the given device \param[out] device A pointer to the neodevice_t structure specifying the device to read out the timestamp for. \param[out] resolution A pointer to a uint16_t where the resolution will be stored. This value is in nanoseconds.
- icsneo_
getVersion ⚠ - \brief Get the version of libicsneo in use. \returns A neoversion_t structure containing the version.
- icsneo_
goOffline ⚠ - \brief Disable network communication for the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if communication could be disabled.
- icsneo_
goOnline ⚠ - \brief Enable network communication for the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if communication could be enabled.
- icsneo_
isMessage ⚠Polling Enabled - \brief Verify message polling status for the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if polling is enabled.
- icsneo_
isOnline ⚠ - \brief Verify network communication for the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if communication is enabled.
- icsneo_
isOpen ⚠ - \brief Verify network connection for the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if the device is connected.
- icsneo_
isTermination ⚠Enabled For - \brief Check whether software switchable termination is currently enabled for a given network in the currently active device settings. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network ID to check \returns True if software switchable termination is currently enabled
- icsneo_
isTermination ⚠Supported For - \brief Check whether software switchable termination is supported for a given network on this device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network ID to check \returns True if software switchable termination is supported
- icsneo_
isValid ⚠NeoDevice - \brief Verify that a neodevice_t is valid. \param[in] device A pointer to the neodevice_t structure to operate on. \returns True if the neodevice_t is valid.
- icsneo_
open ⚠Device - \brief Connect to the specified hardware \param[in] device A pointer to the neodevice_t structure specifying the device to open. \returns True if the connection could be opened.
- icsneo_
remove ⚠Event Callback - \brief Removes an event callback. \param[in] id The id of the callback to remove. \returns True if the callback was successfully removed.
- icsneo_
remove ⚠Message Callback - \brief Removes a message callback from the specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] id The id of the callback to remove. \returns True if the callback was successfully removed.
- icsneo_
serial ⚠NumTo String - \brief Convert a serial number in numerical format to its string representation.
\param[in] num A numerical serial number.
\param[out] str A pointer to a buffer where the string representation will be written. NULL can be passed, which will write a character count to
count. \param[inout] count A pointer to a size_t which, prior to the call, holds the maximum number of characters to be written (so str must be of size count + 1 to account for the NULL terminator), and after the call holds the number of characters written. \returns True if str contains the string representation of the given serial number. - icsneo_
serial ⚠String ToNum - \brief Convert a serial number in string format to its numerical representation. \param[in] str A NULL terminated string containing the string representation of an Intrepid serial number. \returns The numerical representation of the serial number, or 0 if the conversion was unsuccessful.
- icsneo_
setBaudrate ⚠ - \brief Set the network baudrate for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network to which the new baudrate should apply. \param[in] newBaudrate The requested baudrate, with no multipliers. (i.e. 500K CAN should be represented as 500000) \returns True if the baudrate could be set.
- icsneo_
setDigitalIO ⚠ - \brief Get the value of a digital IO for the given device \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] type The IO type \param[in] number The index within the IO type, starting from 1 \param[in] value The value which will be written to the IO \returns True if the parameters and connection state are correct to submit the request to the device
- icsneo_
setEvent ⚠Limit - \brief Set the number of events which will be held in the API managed buffer before icsneo::APIEvent::TooManyEvents \param[in] newLimit The new limit. Must be >10. 1 event slot is always reserved for a potential icsneo::APIEvent::TooManyEvents, so (newLimit - 1) other events can be stored.
- icsneo_
setFD ⚠Baudrate - \brief Set the CAN FD baudrate for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network to which the new baudrate should apply. \param[in] newBaudrate The requested baudrate, with no multipliers. (i.e. 2Mbaud CAN FD should be represented as 2000000) \returns True if the baudrate could be set.
- icsneo_
setPolling ⚠Message Limit - \brief Set the maximum number of messages which will be held in the API managed buffer for the specified hardware. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] newLimit The new limit to be enforced. \returns True if the limit was set successfully.
- icsneo_
setRTC ⚠ - \brief Set the real-time clock for the given device. \param[out] device A pointer to the neodevice_t structure specifying the device to write the RTC to. \param[in] input A uint64_t object holding the RTC value. This value is in seconds.
- icsneo_
setTermination ⚠For - \brief Enable or disable software switchable termination for a given network. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] netid The network ID to affect \param[in] enabled Whether to enable or disable switchable termination \returns True if if the call was successful, otherwise an error will have been reported in icsneo_getLastError().
- icsneo_
setWrite ⚠Blocks - \brief Set the behavior of whether writing is a blocking action or not. \param[in] device A pointer to the neodevice_t structure specifying the device to transmit on. \param[in] blocks Whether or not writing is a blocking action.
- icsneo_
settings ⚠Apply - \brief Commit the settings structure for a specified device to non-volatile storage. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if the settings were applied.
- icsneo_
settings ⚠Apply Defaults - \brief Apply the default settings structure for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if the default settings were applied.
- icsneo_
settings ⚠Apply Defaults Temporary - \brief Apply the default settings structure for a specified device temporarily. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if the default settings were applied.
- icsneo_
settings ⚠Apply Structure - \brief Apply a provided settings structure for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] structure A pointer to a device settings structure for the current device. \param[in] structureSize The size of the current device settings structure in bytes. \returns True if the settings were applied.
- icsneo_
settings ⚠Apply Structure Temporary - \brief Apply a provided settings structure for a specified device without saving to non-volatile EEPROM. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[in] structure A pointer to a device settings structure for the current device. \param[in] structureSize The size of the current device settings structure in bytes. \returns True if the settings were applied.
- icsneo_
settings ⚠Apply Temporary - \brief Apply the settings structure for a specified device temporarily. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if the settings were applied.
- icsneo_
settings ⚠Read Structure - \brief Apply the default settings structure for a specified device temporarily. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \param[out] structure A pointer to a device settings structure for the current device. \param[in] structureSize The size of the current device settings structure in bytes. \returns Number of bytes written to structure, or -1 if the operation failed.
- icsneo_
settings ⚠Refresh - \brief Trigger a refresh of the settings structure for a specified device. \param[in] device A pointer to the neodevice_t structure specifying the device to operate on. \returns True if the refresh succeeded.
- icsneo_
transmit ⚠ - \brief Transmit a single message. \param[in] device A pointer to the neodevice_t structure specifying the device to transmit on. \param[in] message A pointer to the neomessage_t structure defining the message. \returns True if the message was verified transmittable and enqueued for transmit.
- icsneo_
transmit ⚠Messages - \brief Transmit a multiple messages. \param[in] device A pointer to the neodevice_t structure specifying the device to transmit on. \param[in] messages A pointer to the neomessage_t structures defining the messages. \param[in] count The number of messages to transmit. \returns True if the messages were verified transmittable and enqueued for transmit.