29 #ifndef TRANSPORTER_CALLBACK_H
30 #define TRANSPORTER_CALLBACK_H
32 #include <kernel_types.h>
33 #include "TransporterDefinitions.hpp"
36 #define TE_DO_DISCONNECT 0x8000
38 enum TransporterError {
47 TE_ERROR_CLOSING_SOCKET = 0x1,
58 TE_ERROR_IN_SELECT_BEFORE_ACCEPT = 0x2,
67 TE_INVALID_MESSAGE_LENGTH = 0x3 | TE_DO_DISCONNECT,
76 TE_INVALID_CHECKSUM = 0x4 | TE_DO_DISCONNECT,
85 TE_COULD_NOT_CREATE_SOCKET = 0x5,
94 TE_COULD_NOT_BIND_SOCKET = 0x6,
103 TE_LISTEN_FAILED = 0x7,
114 TE_ACCEPT_RETURN_ERROR = 0x8
123 ,TE_SHM_DISCONNECT = 0xb | TE_DO_DISCONNECT
134 ,TE_SHM_IPC_STAT = 0xc | TE_DO_DISCONNECT
139 ,TE_SHM_IPC_PERMANENT = 0x21
149 ,TE_SHM_UNABLE_TO_CREATE_SEGMENT = 0xd
159 ,TE_SHM_UNABLE_TO_ATTACH_SEGMENT = 0xe
169 ,TE_SHM_UNABLE_TO_REMOVE_SEGMENT = 0xf
171 ,TE_TOO_SMALL_SIGID = 0x10
172 ,TE_TOO_LARGE_SIGID = 0x11
173 ,TE_WAIT_STACK_FULL = 0x12 | TE_DO_DISCONNECT
174 ,TE_RECEIVE_BUFFER_FULL = 0x13 | TE_DO_DISCONNECT
183 ,TE_SIGNAL_LOST_SEND_BUFFER_FULL = 0x14 | TE_DO_DISCONNECT
192 ,TE_SIGNAL_LOST = 0x15
199 ,TE_SEND_BUFFER_FULL = 0x16
207 ,TE_SCI_UNABLE_TO_CLOSE_CHANNEL = 0x22
216 ,TE_SCI_LINK_ERROR = 0x0017
225 ,TE_SCI_UNABLE_TO_START_SEQUENCE = 0x18 | TE_DO_DISCONNECT
232 ,TE_SCI_UNABLE_TO_REMOVE_SEQUENCE = 0x19 | TE_DO_DISCONNECT
241 ,TE_SCI_UNABLE_TO_CREATE_SEQUENCE = 0x1a | TE_DO_DISCONNECT
249 ,TE_SCI_UNRECOVERABLE_DATA_TFX_ERROR = 0x1b | TE_DO_DISCONNECT
258 ,TE_SCI_CANNOT_INIT_LOCALSEGMENT = 0x1c | TE_DO_DISCONNECT
267 ,TE_SCI_CANNOT_MAP_REMOTESEGMENT = 0x1d | TE_DO_DISCONNECT
275 ,TE_SCI_UNABLE_TO_UNMAP_SEGMENT = 0x1e | TE_DO_DISCONNECT
285 ,TE_SCI_UNABLE_TO_REMOVE_SEGMENT = 0x1f | TE_DO_DISCONNECT
293 ,TE_SCI_UNABLE_TO_DISCONNECT_SEGMENT = 0x20 | TE_DO_DISCONNECT
314 Uint32 *
const signalData,
338 virtual void reportSendLen(NodeId nodeId, Uint32 count, Uint64 bytes) = 0;
346 virtual void reportReceiveLen(NodeId nodeId, Uint32 count, Uint64 bytes) = 0;
372 virtual void reportError(NodeId nodeId, TransporterError errorCode,
373 const char *info = 0) = 0;
397 virtual void unlock_transporter(NodeId node) { }
432 virtual Uint32
bytes_sent(NodeId node, Uint32 bytes) = 0;
472 virtual Uint32 *
getWritePtr(NodeId node, Uint32 lenBytes, Uint32 prio,
481 virtual Uint32
updateWritePtr(NodeId node, Uint32 lenBytes, Uint32 prio) = 0;