rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
tunerstudio_impl.h
Go to the documentation of this file.
1/**
2 * @file tunerstudio_impl.h
3 */
4
5#pragma once
6
7#include <cstdint>
8
9class TsChannelBase;
10
11typedef enum {
13 TS_CRC = 1
15
17public:
18
19protected:
20 virtual void cmdOutputChannels(TsChannelBase* tsChannel, uint16_t offset, uint16_t count) = 0;
21};
22
24public:
25 int handleCrcCommand(TsChannelBase* tsChannel, char *data, int incomingPacketSize);
26 bool handlePlainCommand(TsChannelBase* tsChannel, uint8_t command);
27
28 void cmdOutputChannels(TsChannelBase* tsChannel, uint16_t offset, uint16_t count) override;
29 /**
30 * this command is part of protocol initialization
31 */
33 void handleExecuteCommand(TsChannelBase* tsChannel, char *data, int incomingPacketSize);
34 void handleWriteChunkCommand(TsChannelBase* tsChannel, uint16_t page, uint16_t offset, uint16_t count,
35 void *content);
36 void handleCrc32Check(TsChannelBase *tsChannel, uint16_t page, uint16_t offset, uint16_t count);
37 void handlePageReadCommand(TsChannelBase* tsChannel, uint16_t page, uint16_t offset, uint16_t count);
39
40private:
41 void sendErrorCode(TsChannelBase* tsChannel, uint8_t code, /*empty line by default, use nullptr not to log*/const char *msg="");
42};
uint8_t code
Definition bluetooth.cpp:40
virtual void cmdOutputChannels(TsChannelBase *tsChannel, uint16_t offset, uint16_t count)=0
void sendErrorCode(TsChannelBase *tsChannel, uint8_t code, const char *msg="")
void handleScatteredReadCommand(TsChannelBase *tsChannel)
bool handlePlainCommand(TsChannelBase *tsChannel, uint8_t command)
void handleCrc32Check(TsChannelBase *tsChannel, uint16_t page, uint16_t offset, uint16_t count)
void handleQueryCommand(TsChannelBase *tsChannel, ts_response_format_e mode)
void cmdOutputChannels(TsChannelBase *tsChannel, uint16_t offset, uint16_t count) override
'Output' command sends out a snapshot of current values Gauges refresh
void handlePageReadCommand(TsChannelBase *tsChannel, uint16_t page, uint16_t offset, uint16_t count)
void handleWriteChunkCommand(TsChannelBase *tsChannel, uint16_t page, uint16_t offset, uint16_t count, void *content)
int handleCrcCommand(TsChannelBase *tsChannel, char *data, int incomingPacketSize)
void handleExecuteCommand(TsChannelBase *tsChannel, char *data, int incomingPacketSize)
uint16_t page
Definition tunerstudio.h:0
uint16_t offset
Definition tunerstudio.h:0
uint16_t count
Definition tunerstudio.h:1
ts_response_format_e
@ TS_CRC
@ TS_PLAIN