CHAI SDK
Version 1.3
|
The Pipe is used to exchange messages between two peers in bidirectional ways. More...
Public Member Functions | |
virtual CPNS::IBaseLocalDevice * | GetDevice () const =0 |
Get the related Local DeviceCHAI. More... | |
virtual void | RegisterNotificationHandler (CPNS::IPipe_NotificationHandler *const pHandler)=0 |
Register an Pipe notification handler. More... | |
virtual void | UnregisterNotificationHandler (CPNS::IPipe_NotificationHandler *const pHandler)=0 |
Unregister an Pipe notification handler. More... | |
virtual CPNS::uint16 | GetPipeID () const =0 |
Get the Pipe ID. More... | |
virtual CPNS::boolean | IsSynapse () const =0 |
Check if the Pipe is a Synapse. More... | |
virtual CPNS::boolean | HasConnections ()=0 |
Check if the Pipe has connections. More... | |
virtual void | ClearConnections ()=0 |
Clear all connections. More... | |
virtual CPNS::Enums::Errors | AddConnection (CPNS::Endpoint const &peer)=0 |
Add a connection There is no effect if the connection is already set for the Pipe. More... | |
virtual CPNS::Enums::Errors | RemoveConnection (CPNS::Endpoint const &peer)=0 |
Remove a connection. More... | |
virtual CPNS::Enums::Errors | RemoveAllConnectionsExcept (CPNS::Endpoint const &peer)=0 |
Remove a connection, except the specified. More... | |
virtual CPNS::uint16 | GetNumConnections ()=0 |
Get the number of connections. More... | |
virtual CPNS::Endpoint | GetConnection (CPNS::uint16 const wConnectionIndex)=0 |
Get a connection. More... | |
virtual CPNS::boolean | IsReadyToSend ()=0 |
Check if the Pipe is ready to send Part of the flow control sub-system. More... | |
virtual CPNS::Enums::Errors | Send (CPNS::IBaseMessage const *const pMsg, CPNS::boolean const fFlush)=0 |
Send a message with flush control, allowing multipart messages. More... | |
virtual CPNS::Enums::Errors | Send (CPNS::IBaseMessage const *const pMsg)=0 |
Send a message immediately. More... | |
virtual CPNS::Enums::Errors | Flush ()=0 |
Send pending messages. More... | |
virtual CPNS::Enums::Errors | Signal (CPNS::uint16 const wSignalNumber, CPNS::uint16 const wOptionalData0, CPNS::uint16 const wOptionalData1, CPNS::uint16 const wOptionalData2, CPNS::uint16 const wOptionalData3, CPNS::char8 const *const utf8OptionalData, CPNS::Endpoint const &optionalEndpoint)=0 |
Send a multicast signal directed to all devices present in the peer set. More... | |
virtual CPNS::Enums::Errors | DataConsumed ()=0 |
Tells the sources that incoming SysEx or DataTransfer message has been processed. More... | |
Public Member Functions inherited from CPNS::IObject | |
virtual CPNS::ICHAI * | GetCHAI ()=0 |
Get a pointer to the CHAI hosting this object. More... | |
virtual void | RegisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0 |
Register an Object's notification handler. More... | |
virtual void | UnregisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0 |
Unregister an Object's notification handler. More... | |
virtual CPNS::Enums::ObjectTypes | GetObjectType () const =0 |
Get the object type. More... | |
virtual CPNS::uint32 | GetHandle () const =0 |
Get a unique handle to the object if this object is handled by the trashcan. More... | |
virtual void | SetUserDataPtr (void const *const pData)=0 |
Set a custom user ptr data. More... | |
virtual void * | GetUserDataPtr () const =0 |
Get custom user ptr data. More... | |
virtual void | SetUserDataUInt32 (const CPNS::uint32 dwData)=0 |
Set a custom user uint32 data. More... | |
virtual CPNS::uint32 | GetUserDataUInt32 () const =0 |
Get custom user uint32 data. More... | |
The Pipe is used to exchange messages between two peers in bidirectional ways.
This is a PROPRIETARY communication system to be used between two pipes knowing each others. It does not support parameter synchronization nor recording.
|
pure virtual |
Add a connection There is no effect if the connection is already set for the Pipe.
Add a connection to the Pipe. The peer endpoint must point to another Pipe. Once the connection added from this side, an internal message is automatically sent to the peer in order to make it know this side and establish back communication. Both peers will be notified with other's description.
[in] | peer | This endpoint MUST point to a Pipe. |
|
pure virtual |
Clear all connections.
|
pure virtual |
Tells the sources that incoming SysEx or DataTransfer message has been processed.
If this command is not used, the sender wait for 500ms before sending next SysEx or DataTransferMessage.
|
pure virtual |
Send pending messages.
|
pure virtual |
Get a connection.
[in] | wConnectionIndex | Index, from 0 to GetNumConnections()-1 |
|
pure virtual |
Get the related Local DeviceCHAI.
|
pure virtual |
Get the number of connections.
|
pure virtual |
Get the Pipe ID.
|
pure virtual |
Check if the Pipe has connections.
|
pure virtual |
Check if the Pipe is ready to send Part of the flow control sub-system.
|
pure virtual |
Check if the Pipe is a Synapse.
A Synapse automatically forward incoming messages to every connected Pipes, except the message source.
|
pure virtual |
Register an Pipe notification handler.
[in] | pHandler | Pointer to the application object implementing IPipe_NotificationHandler. If pHandler is NULL, clear all registered handlers. |
|
pure virtual |
Remove a connection, except the specified.
[in] | peer | the remote Pipe endpoint to keep connected |
|
pure virtual |
Remove a connection.
[in] | peer | the remote Pipe endpoint to be removed |
|
pure virtual |
Send a message with flush control, allowing multipart messages.
[in] | pMsg | Pointer to the message to send. This message object can be released as soon this method returns. |
[in] | fFlush | If TRUE, the message is immediately prepared and sent, including prospective multipart messages added before. Setting fFlush at TRUE is the normal way to send a single message, or to specify the last and send the whole of a multipart message. If FALSE, the message is added to the multipart buffer, except if the buffer is full. In this case, the multipart message is sent, and a new one is created to store the new message. |
|
pure virtual |
Send a message immediately.
[in] | pMsg | Pointer to the message to send. This message object can be released as soon this method returns. |
|
pure virtual |
Send a multicast signal directed to all devices present in the peer set.
Only one signal per device is sent.
[in] | wSignalNumber | Standard Signal numbers are available from CPNS::Enums::Signals |
[in] | wOptionalData0 | Optional value, depending on the signal number |
[in] | wOptionalData1 | Optional value, depending on the signal number |
[in] | wOptionalData2 | Optional value, depending on the signal number |
[in] | wOptionalData3 | Optional value, depending on the signal number |
[in] | utf8OptionalData | Optional value, depending on the signal number |
[in] | optionalEndpoint | Optional value, depending on the signal number |
|
pure virtual |
Unregister an Pipe notification handler.
[in] | pHandler | Pointer to the application object implementing IPipe_NotificationHandler. If pHandler is NULL, clear all registered handlers. |