VitroIO SDK
Software development kit for Vitro Shard.
Loading...
Searching...
No Matches
can_layer.h
Go to the documentation of this file.
1#ifndef VITROIO_SDK_CAN_LAYER
2#define VITROIO_SDK_CAN_LAYER
3
4#include <mbed.h>
5#include "transport_layer.h"
6
8
9namespace vitroio {
10
11namespace sdk {
20 class Can_layer: public Transport_layer {
21 Canbus *bus_;
22 uint32_t timestamp_;
23
29 void frameReceivedCallback(const CanbusFrame& frame);
30
31 public:
32
39 Can_layer(Canbus *bus, uint32_t nodeId);
40
49 int send(uint32_t parameterId, const IoVec* iov, int iovcnt);
50
56 uint32_t getTimestamp();
57
66 int computeCRC(const IoVec *iov, int iovcnt, uint32_t *crc_value);
67 };
71}
72
73}
74
75#endif // VITROIO_SDK_CAN_LAYER
This class implements CAN bus transport layer for IoT Blockss.
Definition: can_layer.h:20
Can_layer(Canbus *bus, uint32_t nodeId)
Construct a new Can_layer object.
uint32_t getTimestamp()
Function sends timestamp request and returns timestamp value.
int send(uint32_t parameterId, const IoVec *iov, int iovcnt)
Function sends given data.
int computeCRC(const IoVec *iov, int iovcnt, uint32_t *crc_value)
Function computes CRC of data send via CAN bus to Crystal.
Class is a wrapper for mbed::CANMessage. It provides interface allowing creation of frames complied w...
Definition: canbus_frame.h:24
Class is a wrapper for mbed::CAN class and provides interface for CanbusFrame type.
Definition: canbus.h:50
Virtual class providing interface for communication interfaces.
Definition: transport_layer.h:29
uint32_t nodeId()
Returns node ID.
Definition: transport_layer.h:68
The namespace contains all of components of vitro-shard-sdk and components based on the sdk....
Definition: can_layer.h:9
Structure for dealing with fragmentation of IoTBlocks.
Definition: transport_layer.h:18