PTP ServerDevice events

PTP ServerDevice generates protocol events of the following types: ServerProtoEvent and ServerProtoEvent_slot.


struct ServerProtoEvent // meta-named as PTPServerEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint8 ev;
 };

ev is en event type.


struct ServerProtoEvent_slot // meta-named as PTPServerEventSlot
 {
  EventTimeType time;
  EventIdType id;
  
  uint8 ev;
  uint32 slot;
 };

ev is en event type.

slot is a slot number.

Event type is represented by the following enum:


enum ServerEvent : uint8
 {
  ServerEvent_Trans,         // "Trans"          Push
  ServerEvent_TransDone,     // "Trans done"     Stop
  
  ServerEvent_Timeout,       // "Timeout"        Pass
  ServerEvent_Cancel,        // "Cancel"         Pass
  ServerEvent_ClientCancel,  // "Client cancel"  Pass
  ServerEvent_Abort,         // "Abort"          Pass
  
  ServerEvent_CALL,          // "<- CALL"        Down
  ServerEvent_RECALL,        // "<- RECALL"      Down
  ServerEvent_SENDRET,       // "<- SENDRET"     Down
  ServerEvent_ACK,           // "<- ACK"         Down
  
  ServerEvent_RET,           // "-> RET"         Up
  ServerEvent_CANCEL,        // "-> CANCEL"      Up
  ServerEvent_NOINFO,        // "-> NOINFO"      Up
  ServerEvent_RERET,         // "-> RERET"       Up
  
  ServerEvent_BadTransId,    // "Bad TransId"    Error

  ServerEvent_NoSlot,        // "No slot"        Error
  ServerEvent_NoSlotCancel,  // "No slot cancel" Error
  ServerEvent_NoFreeSlot,    // "No free slot"   DownBlock
  ServerEvent_NoPacket,      // "No packet"      Error
  
  ServerEvent_BadInbound,    // "Bad inbound"    Error
  ServerEvent_BadOutbound,   // "Bad outbound"   Error
  
  ServerEventLim
 };