Open MrZebulon opened 3 months ago
void teensy_handleIntranetIn(int packetSize);
class BaseTeensyIntranet : public virtual BaseIntranetChannel {
public:
// init function
virtual void init() = 0;
// not implemented, read async from channel
bool readByte(uint8_t& byte) override { return false; }
};
How will the Intranet Work ?
Read - The raw data is transferred from the bus to the read buffer asynchronously. The buffer is then read synchronously each tick.
buffer to callback sync via encode
readByte : sync read raw bytes from buffer
onRead : to be implemented
Write - The packet is transformed into raw data and stored in the write buffer. For the teensy, the raw data in the buffer should be sent synchronously. It should also be possible to write asynchronously (e.g. upon receiving data)
write : writing to buffer via
encode : sync buffer to channel
writeByte : to be implemented
UNIT TESTING PROCEDURE
Notes from SE