|
VitroIO SDK
Software development kit for Vitro Shard.
|
This class implements CAN bus transport layer for IoT Blocks. More...
#include <can_layer.h>


Public Member Functions | |
| Can_layer (Canbus *bus, uint32_t nodeId) | |
| Construct a new Can_layer object. | |
| int | send (uint32_t parameterId, const IoVec *iov, int iovcnt) |
| Function sends given data. | |
| int | sendRaw (uint32_t parameterId, uint8_t *data, uint8_t nBytes) |
| Function sends given raw data without the IoT Block overhead. | |
| uint32_t | getTimestamp () |
| Function sends timestamp request and returns timestamp value. | |
| int | computeCRC (const IoVec *iov, int iovcnt, uint32_t *crc_value) |
| Function computes CRC of data send via CAN bus to Crystal. | |
Public Member Functions inherited from vitroio::sdk::Transport_layer | |
| void | updateNodeId (uint32_t nodeId) |
| Update node ID. | |
| uint32_t | nodeId () |
| Returns node ID. | |
Additional Inherited Members | |
Protected Member Functions inherited from vitroio::sdk::Transport_layer | |
| Transport_layer (uint32_t nodeId) | |
Protected Attributes inherited from vitroio::sdk::Transport_layer | |
| uint32_t | nodeId_ |
This class implements CAN bus transport layer for IoT Blocks.
| vitroio::sdk::Can_layer::Can_layer | ( | Canbus * | bus, |
| uint32_t | nodeId ) |
| int vitroio::sdk::Can_layer::computeCRC | ( | const IoVec * | iov, |
| int | iovcnt, | ||
| uint32_t * | crc_value ) |
Function computes CRC of data send via CAN bus to Crystal.
| iov | Chunks of data |
| iovcnt | Count of chunks |
| crc_value | Pointer to save CRC |
|
virtual |
Function sends timestamp request and returns timestamp value.
Reimplemented from vitroio::sdk::Transport_layer.
|
virtual |
Function sends given data.
| parameterId | Id of parameter sent |
| iov | Pointer to first IoVec with data to be sent IoVec |
| iovcnt | Count of IoVects to read |
Reimplemented from vitroio::sdk::Transport_layer.
| int vitroio::sdk::Can_layer::sendRaw | ( | uint32_t | parameterId, |
| uint8_t * | data, | ||
| uint8_t | nBytes ) |
Function sends given raw data without the IoT Block overhead.
| parameterId | Id of parameter sent |
| data | Pointer to the array containing the data to be sent. Only 8 bytes are allowed |
| nBytes | Number of bytes to be sent. If more than 8bytes are used, they will be dropped |