9#define DEBUG_SERIAL Serial
78 void setName(
const char *mname) { module_config->setName(mname); }
99 void sendDGN(
byte serviceIndex,
byte diagCode,
unsigned int counter);
125 bool sendMessageWithNNandData(
VlcbOpCodes opc) {
return sendMessageWithNNandData(opc, 0, 0); }
126 bool sendMessageWithNNandData(
VlcbOpCodes opc,
int len, ...);
129 unsigned int diagMsgsActed = 0;
134 return sendMessageWithNNandData(opc);
139 return sendMessageWithNNandData(opc, 1, b1);
144 return sendMessageWithNNandData(opc, 2, b1, b2);
149 return sendMessageWithNNandData(opc, 3, b1, b2, b3);
154 return sendMessageWithNNandData(opc, 4, b1, b2, b3, b4);
159 return sendMessageWithNNandData(opc, 5, b1, b2, b3, b4, b5);
Definition ArrayHolder.h:17
Definition CircularBuffer.h:15
a class to encapsulate Controller module configuration, events, NVs, EEPROM, etc
Definition Configuration.h:40
bool sendWRACK()
send a WRACK (write acknowledge) message
Definition Controller.cpp:200
bool sendMessageWithNN(VlcbOpCodes opc)
Definition Controller.h:132
void setParamFlag(VlcbParamFlags flag, bool set)
Definition Controller.cpp:130
Controller(Configuration *conf)
Definition Controller.cpp:30
void sendGRSP(VlcbOpCodes opCode, byte serviceType, byte errCode)
Definition Controller.cpp:215
bool sendMessage(const VlcbMessage *msg)
Definition Controller.cpp:174
void begin()
Initialise VLCB.
Definition Controller.cpp:76
void indicateMode(VlcbModeParams mode)
set the Controller LEDs to indicate the current mode
Definition Controller.cpp:120
Configuration * getModuleConfig() const
Definition Controller.h:76
Parameters & getParams()
Definition Controller.h:84
bool pendingTasks()
Definition Controller.cpp:241
void messageActedOn()
Definition Controller.cpp:246
unsigned int getMessagesActedOn()
Definition Controller.h:112
byte getModuleCANID() const
Definition Controller.h:101
void setName(const char *mname)
Definition Controller.h:78
void setServices(std::initializer_list< Service * > services)
Definition Controller.cpp:62
bool sendCMDERR(byte cerrno)
send a CMDERR (command error) message
Definition Controller.cpp:209
const ArrayHolder< Service * > & getServices()
Definition Controller.h:80
bool pendingAction()
Definition Controller.cpp:236
unsigned char getParam(VlcbParams param) const
Definition Controller.h:85
void sendDGN(byte serviceIndex, byte diagCode, unsigned int counter)
Definition Controller.cpp:220
void putAction(const Action &action)
Definition Controller.cpp:225
void addTimedResponseTask(TimedResponse::Task *task)
Definition Controller.cpp:252
void process()
main Controller message processing procedure
Definition Controller.cpp:150
void updateParamFlags()
assign the module parameter set
Definition Controller.cpp:88
void indicateActivity()
Definition Controller.cpp:142
const CircularBuffer< Action, ACTION_QUEUE_SIZE > & getActionQueue() const
Definition Controller.h:114
Definition Parameters.h:16
unsigned char * getParams() const
Definition Parameters.h:69
Definition TimedResponse.h:26
Manage tasks that respond with messages at timed intervals.
Definition TimedResponse.h:21
Convenience class for use with initializer lists, i.e. bracketed list of items: { a,...
Definition initializer_list.h:19
Definition AbstractEventTeachingService.cpp:13
ACTION
Type of Action.
Definition Controller.h:37
@ ACT_INDICATE_MODE
The mode has changed and should be indicated by the user interface.
Definition Controller.h:45
@ ACT_MESSAGE_IN
A message coming in to the node.
Definition Controller.h:38
@ ACT_START_CAN_ENUMERATION
A request to start CAN enumeration from the user interface.
Definition Controller.h:40
@ ACT_INDICATE_ACTIVITY
Some minor activity happened that should be indicated by the user interface.
Definition Controller.h:43
@ ACT_INDICATE_WORK
Some work for the node occurred and should be indicated by the user interface.
Definition Controller.h:44
@ ACT_RENEGOTIATE
A request to change node number from the user interface.
Definition Controller.h:42
@ ACT_MESSAGE_OUT
A message sent out from the node.
Definition Controller.h:39
@ ACT_CHANGE_MODE
A request to change mode from the user interface.
Definition Controller.h:41
const int ACTION_QUEUE_SIZE
Definition Controller.h:24
An action to be performed.
Definition Controller.h:51
VlcbModeParams mode
with ACT_INDICATE_MODE
Definition Controller.h:57
bool fromENUM
with ACT_START_CAN_ENUMERATION
Definition Controller.h:56
enum ACTION actionType
Type of action.
Definition Controller.h:52
VlcbMessage vlcbMessage
with ACT_MESSAGE_IN & ACT_MESSAGE_OUT
Definition Controller.h:55
CAN/Controller message type.
Definition Controller.h:30
uint8_t len
Definition Controller.h:31
uint8_t data[8]
Definition Controller.h:32
VlcbParams
Definition vlcbdefs.hpp:507
VlcbModeParams
Definition vlcbdefs.hpp:562
VlcbParamFlags
Definition vlcbdefs.hpp:544
VlcbOpCodes
Definition vlcbdefs.hpp:188