39 if (_ncpChannel != -1)
49 lout <<
"linkchan: << msg ";
56 if ((len >= 5) && (
a.getByte(0) == 1)) {
58 unsigned int ser =
a.getWord(1);
59 int res =
a.getWord(3);
65 strncpy(srvName,
a.getString(7), 17);
67 lout <<
"linkchan: received registerAck: ser=0x" << hex << setw(4)
68 << setfill(
'0') << ser <<
" res=" << res <<
" srvName=\""
69 << srvName <<
"\"" << endl;
75 lout <<
"linkchan: found ser=0x" << hex << setw(4) <<
76 setfill(
'0') << se.
getWord(0) <<
77 " on stack -> callBack to waiting chan" << endl;
78 if (strlen(srvName) < 4)
79 strcat(srvName,
".*");
87 lerr <<
"linkchan: unknown message " <<
a.getByte(0) << endl;
100 lout <<
"linkchan: << cack" << endl;
107 lout <<
"linkchan: << ctrm" << endl;
An array of bufferStores.
bufferStore pop(void)
Removes the first bufferStore.
bool empty() const
Checks if this bufferArray is empty.
A generic container for an array of bytes.
uint16_t getWord(long pos=0) const
Retrieves the word at index pos.
void addWord(int w)
Appends a word to the content of this instance.
void ncpSend(bufferStore &a)
virtual const char * getNcpRegisterName()=0
void ncpDoRegisterAck(int ch, const char *name)
void setNcpChannel(int chan)
void terminateWhenAsked()
linkChan(NCP *ncpController, int ncpChannel=-1)
void ncpConnectTerminate()
const char * getNcpRegisterName()
bufferArray registerStack
void ncpDataCallback(bufferStore &a)
#define LINKCHAN_DEBUG_DUMP
#define LINKCHAN_DEBUG_LOG