Skip to content

CommunicationService

Daniel Johnson edited this page Feb 11, 2022 · 2 revisions
  1. Introduction
  2. Function Descriptions
  3. Examples

1. Introduction

The CommunicationService is a basic abstraction that can be used to represent UART, USB CDC, CAN, etc.

2. Function Descriptions

void Send(void *data, size_t length)

This sends data on the communication bus.

void RegisterReceiveCallBack(std::function<size_t(void *data, size_t length)> *callBack)

This registers a callBack to be executed when the communication service receives data through the Receive function.

void UnRegisterReceiveCallBack(std::function<size_t(void *data, size_t length)> *callBack)

This unregisters a callBack from being executed when the communication service receives data through the Receive function.

3. Examples