Go to the documentation of this file.
10 #ifndef SIMULATION_INTERFACE_H_
11 #define SIMULATION_INTERFACE_H_
23 Simulation_RFI(
const uint8_t maxMessageLength);
25 ~Simulation_RFI()
override;
33 bool send(uint8_t* data, uint8_t dataSize)
override;
35 bool recv(uint8_t* data, uint8_t& dataSize, int8_t& rssi)
override;
39 bool sleep()
override;
47 bool setPower(uint8_t power)
override;
59 uint8_t
scanChannels(uint8_t startChannel, uint8_t endChannel, uint8_t retries = 50, STREAM *stream = NULL)
override;
61 uint8_t
scanChannels(uint8_t startChannel, uint8_t endChannel, STREAM *stream = NULL)
override {
62 return scanChannels(startChannel, endChannel, 50, stream);
69 #ifndef RF_NO_INTERNAL_TMP_BUFFER
71 uint8_t internalTmpBuffer[32];
75 NodeSimulator* ni = NULL;
77 uint32_t millis()
override;
78 uint32_t micros()
override;
79 uint64_t micros64()
override;
80 void delay(uint32_t time)
override;
81 void delayMicroseconds(uint32_t time)
override;
82 std::chrono::nanoseconds PauseSimulationTimer()
override;
83 void ResumeSimulationTimer()
override;
84 std::mutex& GetStreamMutex()
override;
85 std::mutex& GetMutex()
override;
86 bool isLogOnly()
override;
87 void logTableChange(std::string& descriptor, TableChangeType changeType,
const char* data)
override;
virtual bool hasError()=0
Override this method to check if radio has some error or is not connected to MCU. If this method retu...
Structure, which holds network scan result.
Definition: meshPacketFlags.h:452
virtual uint8_t * getInternalTemporaryBuffer()=0
Gets pointer to internal temporary buffer with size of MaxFrameLength. This buffer can be used for te...
This file contains interface (pattern) class, that has to be overridden to create driver for radio wh...
Radio frequency interface, that helps to use meshNet with different radios or communication types....
Definition: RFInterface.h:48
virtual bool interruptHandle()=0
This method has to be done, when ReceiveInterrupt happened.
virtual uint32_t getChannelsWidth()=0
Gets width of each channels in kHz.
virtual bool setReceiveInterruptCallback(void(*InterruptCallback)(void))=0
Override this method to set receive message interrupt method. If interrupt cannot be set or is not su...
virtual bool send(uint8_t *data, uint8_t dataSize)=0
Override this method to send data through radio.
virtual void printDetails(OSTREAM *stream)=0
This method is used to print radio details to stream (usually to Serial port). Method is also called,...
virtual bool setPower(uint8_t power)=0
Override this method to set radio output power. If radio output power cannot be set,...
virtual bool checkInterference()=0
Override this method to check, if there is currently an interference in the air. If interference chec...
virtual bool deInit()=0
Override this method to de-initialize radio and communication with it.
virtual bool setChannel(uint8_t channel)=0
Override this method to set radio channel. If channels cannot be set on selected radio,...
virtual bool scanChannelsWorking()=0
Checks if channel scan is processed now.
virtual bool recv(uint8_t *data, uint8_t &dataSize, int8_t &rssi)=0
Override this method to read data from radio buffer.
virtual bool sleep()=0
Override this method to temporary power off the radio. If the radio cannot sleep, just return true.
Structure that represents physical MAC address used in MeshNEt protocol. MeshMAC address unlike MAC a...
Definition: meshHelper.h:207
virtual void handle()=0
This method is included in meshNet::handle() method and it is included in main loop.
virtual bool init()=0
Override this method to initialize radio and communication with it.
virtual bool setFullSpeed(bool enableFullSpeed)=0
Override this method to set full or slow speed (data rate). If speed cannot be set,...
virtual uint8_t scanChannels(uint8_t startChannel, uint8_t endChannel, uint8_t retries=50, OSTREAM *stream=NULL)=0
This method has to scan all free channels and returns channel with minimum interferences....
virtual bool wakeUp()=0
Override this method to temporary power on (wake up) the radio from sleep. If the radio cannot sleep,...
virtual uint8_t available()=0
Override this method to get raw size of received frame in bytes.