VitroIO SDK
Software development kit for Vitro Shard.
Loading...
Searching...
No Matches
transport_layer.h
Go to the documentation of this file.
1#ifndef VITROIO_SDK_TRANSPORT_LAYER
2#define VITROIO_SDK_TRANSPORT_LAYER
3
4#include <mbed.h>
5
6namespace vitroio {
7namespace sdk {
8
18struct IoVec {
19 void *iov_base;
20 size_t iov_len;
21};
22
30 protected:
31 uint32_t nodeId_;
32
33 inline Transport_layer(uint32_t nodeId)
35 {
36 }
37
38 public:
47 virtual int send(uint32_t parameterId, const IoVec* iov, int iovcnt);
48
54 virtual uint32_t getTimestamp();
55
61 inline void updateNodeId(uint32_t nodeId) { nodeId_ = nodeId; }
62
68 inline uint32_t nodeId() { return nodeId_; }
69};
73}
74}
75
76#endif // VITROIO_SDK_TRANSPORT_LAYER
Virtual class providing interface for communication interfaces.
Definition: transport_layer.h:29
Transport_layer(uint32_t nodeId)
Definition: transport_layer.h:33
void updateNodeId(uint32_t nodeId)
Update node ID.
Definition: transport_layer.h:61
virtual int send(uint32_t parameterId, const IoVec *iov, int iovcnt)
Function sends given data.
uint32_t nodeId()
Returns node ID.
Definition: transport_layer.h:68
uint32_t nodeId_
Definition: transport_layer.h:31
virtual uint32_t getTimestamp()
Function sends timestamp request and returns timestamp value.
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
void * iov_base
Definition: transport_layer.h:19
size_t iov_len
Definition: transport_layer.h:20