GlobalBpiLib
1.0
|
Default implementation of the logic of a protocol implementation. More...
#include <ProtocolLogic.h>
Public Member Functions | |
void | start () |
void | stop () |
void | portInput (EthernetMessage *input) |
void | controlInput (std::string input) |
virtual void | sendMessage (EthernetMessage *msg, int outPorts) |
Static Public Member Functions | |
static void * | protoLogicEntry (void *This) |
Protected Member Functions | |
void | _runProtoLogic () |
void | _initializeProtocol () |
void | _sendMessage (EthernetMessage *msg, int outPorts) |
virtual Port * | _createPort (int i) |
virtual void | _executeProtocolLogic () |
virtual void | _handleControlMessages () |
virtual void | _handleControlMessage (std::string cmdId, std::string cmd) |
virtual void | _handleControlMessageFI (std::string cmdId, std::string cmd) |
Protected Attributes | |
Port ** | ports |
std::vector< EthernetMessage * > | protocol_messages |
std::deque< std::string > | control_messages |
pthread_t | protologic |
pthread_mutex_t | _mutex |
pthread_cond_t | _cond |
bool | run = true |
BpiOutStream | bpiout |
BpiOutStream | bpierr |
char | source_mac [6] |
Default implementation of the logic of a protocol implementation.
|
protected |
DO NOT CALL THIS FUNCTION! Implementation of the sending routine which shall not be modified or derived from.
DO NOT CALL THIS FUNCTION FOR SENDING MESSAGES!
Adds a message to the egressPorts specified by the binary representation of outPort, i.e. 0<=outPorts = (p3,p2,p1,p0) <=15 where pi=1 indicates to send on port i.
Example: outPorts=0b0101 means to send on port 0 as well as port 2.
|
virtual |
Sends msg (adds msg to the coresponding port queues) via ports specified by the binary representation of the parameter ports.
Adds a message to the egressPorts specified by the binary representation of outPort, i.e. 0<=outPorts = (p3,p2,p1,p0) <=15 where pi=1 indicates to send on port i.
Example: outPorts=0b0101 means to send on port 0 as well as port 2.
|
protected |
Error output printer.
|
protected |
Standard output printer.