CHAI SDK  Version 1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CPNS::IOutput Class Referenceabstract

The Output object is used to send messages to a set of destinations (one or more inputs) More...

+ Inheritance diagram for CPNS::IOutput:
+ Collaboration diagram for CPNS::IOutput:

Public Member Functions

virtual operator CPNS::IBaseOutput * () const =0
 
virtual CPNS::uint16 GetOutputID () const =0
 Get the Output ID. More...
 
virtual void SetCapabilities (CPNS::CombinedInOutCapabilities const caps)=0
 Set the Output capabilities. More...
 
virtual void RegisterNotificationHandler (CPNS::IOutput_NotificationHandler *const pHandler)=0
 Register an Output notification handler. More...
 
virtual void UnregisterNotificationHandler (CPNS::IOutput_NotificationHandler *const pHandler)=0
 Unregister an Output notification handler. More...
 
virtual void RegisterClockGeneratorNotificationHandler (CPNS::IOutput_ClockGeneratorNotificationHandler *const pHandler)=0
 Register an Output clock generator notification handler. More...
 
virtual void UnregisterClockGeneratorNotificationHandler (CPNS::IOutput_ClockGeneratorNotificationHandler *const pHandler)=0
 Unregister an Output clock generator notification handler. More...
 
virtual CPNS::Enums::Errors Clock_Set (CPNS::BPM16 const BPM, CPNS::uint8 const bCPQNMultiplier)=0
 Set clock description. More...
 
virtual CPNS::Enums::Errors Clock_Tick (CPNS::uint16 const wTickCount)=0
 Send a clock tick. More...
 
virtual CPNS::Enums::Errors Clock_SetControllerInput (CPNS::IInput *const pInput)=0
 Set the companion Clock Controller Input. More...
 
virtual CPNS::Enums::Errors Clock_GeneratorCommand (CPNS::Enums::ClockGeneratorCommands const cmd)=0
 Control the generator state, independently to the listener(s). More...
 
virtual CPNS::Enums::Errors Clock_RunFromStart (CPNS::boolean const fDispatchToAllListeners)=0
 Run clock from start. More...
 
virtual CPNS::Enums::Errors Clock_Stop (CPNS::boolean const fDispatchToAllListeners)=0
 Stop clock. More...
 
virtual CPNS::Enums::Errors Clock_Run (CPNS::boolean const fDispatchToAllListeners)=0
 Run clock Use Clock ID get from searching for directed clock control, or use CreateClockID() to get a wildcard Clock ID. More...
 
virtual CPNS::Enums::Errors Clock_FillIn (CPNS::boolean const fDispatchToAllListeners)=0
 FillIn clock. More...
 
virtual CPNS::Enums::Errors Clock_State (CPNS::boolean const fDispatchToAllListeners, CPNS::boolean const fState)=0
 Clock state. More...
 
virtual CPNS::Enums::Errors Clock_SetPositionImmediate (CPNS::boolean const fDispatchToAllListeners, CPNS::uint32 const dwPosition)=0
 Set immediately a new clock position. More...
 
virtual CPNS::Enums::Errors Clock_SetPositionPrepare (CPNS::boolean const fDispatchToAllListeners, CPNS::uint32 const dwPosition)=0
 Prepare clock position. More...
 
virtual CPNS::Enums::Errors Clock_SetPositionTrigger (CPNS::boolean const fDispatchToAllListeners)=0
 Trig prepared clock position setting. More...
 
virtual CPNS::boolean HasDestinations ()=0
 Check if the Output has destinations. More...
 
virtual void ClearDestinations ()=0
 Clear all destinations. More...
 
virtual CPNS::Enums::Errors AddDestination (CPNS::Endpoint const &destination)=0
 Add a destination There is no effect if the destination is already set for the Output. More...
 
virtual CPNS::Enums::Errors RemoveDestination (CPNS::Endpoint const &destination)=0
 Remove a destination. More...
 
virtual CPNS::uint16 GetNumDestinations ()=0
 Get the number of destinations. More...
 
virtual CPNS::Endpoint GetDestination (CPNS::uint16 const wDestinationIndex)=0
 Get a destination. More...
 
virtual
CPNS::Enums::DataConsumeModes 
GetDestinationDataConsumeMode ()=0
 Check if the destination is needing handshaking. More...
 
virtual CPNS::boolean IsReadyToSend ()=0
 Check if the output 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 destination set. More...
 
- Public Member Functions inherited from CPNS::IBaseOutput
CPNS::IOutputGetIOutput () const
 Check Output type and return an IOutput object pointer if type match. More...
 
CPNS::IControllerGetIController () const
 Check Controller type and return an IController object pointer if type match. More...
 
virtual CPNS::IBaseLocalDeviceGetDevice () const =0
 Get the related Local DeviceCHAI. More...
 
virtual void SetDisabledInternalSnapshot (CPNS::boolean const fDisabled)=0
 Enable/disable the internal snapshot capability for this output. More...
 
virtual CPNS::UTF8String GetName () const =0
 Get the Output name. More...
 
virtual void SetName (CPNS::char8 const *const utf8Name)=0
 Set the Output name. More...
 
virtual CPNS::Endpoint GetEndpoint ()=0
 Get the Endpoint related to the output. More...
 
virtual void SetSectionID (CPNS::SectionID const &sectionID)=0
 Set the Output section. More...
 
virtual CPNS::SectionID GetSectionID () const =0
 Get the Output section. More...
 
virtual CPNS::boolean IsCompatibleWith (CPNS::CombinedInOutCapabilities const inCaps)=0
 Check if the output is compatible with the specified input caps. More...
 
virtual
CPNS::CombinedInOutCapabilities 
GetCapabilities () const =0
 Get the Output capabilities. More...
 
virtual CPNS::boolean HasRecordingDestinations ()=0
 Check if the Output has recording destinations. More...
 
virtual void ClearRecordingDestinations ()=0
 Clear all recording destinations. More...
 
virtual CPNS::Enums::Errors AddRecordingDestination (CPNS::Endpoint const &destination)=0
 Add a recording destination There is no effect if the recording destination is already set for the Output. More...
 
virtual CPNS::Enums::Errors RemoveRecordingDestination (CPNS::Endpoint const &destination)=0
 Remove a recording destination. More...
 
virtual CPNS::uint16 GetNumRecordingDestinations ()=0
 Get the number of recording destinations. More...
 
virtual CPNS::Endpoint GetRecordingDestination (CPNS::uint16 const wDestinationIndex)=0
 Get a recording destination. More...
 
virtual void EnableSendingDuringGlobalLearning (CPNS::boolean const fEnable)=0
 Allow sending message during global learning. More...
 
virtual void ClearTimeStamp ()=0
 Clear any timestamp information. More...
 
virtual void SetTimeStampOffline ()=0
 Set the timestamp in offline mode. More...
 
virtual void SetTimeStampSongPosition (CPNS::SongPosition const position)=0
 Set the timestamp to Song Position value. More...
 
virtual void SetTimeStampSystemTime (CPNS::SystemTime const position)=0
 Set the timestamp to System Time value. More...
 
virtual void SetTimeStampSystemTimeFromGlobalSynchronizedTime ()=0
 Set timestamp from Global Synchronized Clock (unit is 1us). More...
 
virtual void EnableAutoTimeStampOnRecording (CPNS::boolean const fEnable)=0
 Enable/disable automatic timestamping during recording session. More...
 
virtual CPNS::Enums::Errors QueryCurrentParameterValues ()=0
 Send a query for all current parameter values refresh to the connected input. More...
 
virtual CPNS::Enums::Errors QueryCurrentParameterValue (CPNS::ParameterID const &paramID)=0
 Send a query of current parameter value update for the specified parameter. More...
 
- Public Member Functions inherited from CPNS::IObject
virtual CPNS::ICHAIGetCHAI ()=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...
 

Detailed Description

The Output object is used to send messages to a set of destinations (one or more inputs)

Member Function Documentation

virtual CPNS::Enums::Errors CPNS::IOutput::AddDestination ( CPNS::Endpoint const &  destination)
pure virtual

Add a destination There is no effect if the destination is already set for the Output.

Warning
calling this method implicitly flush the output before performing the action.
Parameters
[in]destinationthe new destination
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_TooManyDestinations
virtual void CPNS::IOutput::ClearDestinations ( )
pure virtual

Clear all destinations.

virtual CPNS::Enums::Errors CPNS::IOutput::Clock_FillIn ( CPNS::boolean const  fDispatchToAllListeners)
pure virtual

FillIn clock.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Note
Present for retro-compatibility with DIN sync 24
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_GeneratorCommand ( CPNS::Enums::ClockGeneratorCommands const  cmd)
pure virtual

Control the generator state, independently to the listener(s).

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Parameters
[in]cmdCommand to be applied
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_Run ( CPNS::boolean const  fDispatchToAllListeners)
pure virtual

Run clock Use Clock ID get from searching for directed clock control, or use CreateClockID() to get a wildcard Clock ID.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_RunFromStart ( CPNS::boolean const  fDispatchToAllListeners)
pure virtual

Run clock from start.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_Set ( CPNS::BPM16 const  BPM,
CPNS::uint8 const  bCPQNMultiplier 
)
pure virtual

Set clock description.

Remarks
Only available if the Output has the IOC_Clock capability
Parameters
[in]BPMBPM value (0xFFFF if not applicable, default value = 0xFFFF)
[in]bCPQNMultiplierClock resolution = 24 * bCPQNMultiplier (default value = 1)
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_SetControllerInput ( CPNS::IInput *const  pInput)
pure virtual

Set the companion Clock Controller Input.

Parameters
[in]pInputController input. Must have the IOC_ClockControl capability.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_SetPositionImmediate ( CPNS::boolean const  fDispatchToAllListeners,
CPNS::uint32 const  dwPosition 
)
pure virtual

Set immediately a new clock position.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
[in]dwPositionNew clock position, expressed in 24cpqn
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_SetPositionPrepare ( CPNS::boolean const  fDispatchToAllListeners,
CPNS::uint32 const  dwPosition 
)
pure virtual

Prepare clock position.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
[in]dwPositionNew clock position, expressed in 24cpqn
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_SetPositionTrigger ( CPNS::boolean const  fDispatchToAllListeners)
pure virtual

Trig prepared clock position setting.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_State ( CPNS::boolean const  fDispatchToAllListeners,
CPNS::boolean const  fState 
)
pure virtual

Clock state.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Note
Present for retro-compatibility with DIN sync 24
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
[in]fStatecurrent clock state
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_Stop ( CPNS::boolean const  fDispatchToAllListeners)
pure virtual

Stop clock.

Remarks
Only available if the Output has the IOC_Clock or IOC_ClockControl capability
Parameters
[in]fDispatchToAllListenersNo effect if the Output is IOC_Clock. If the Output is IOC_ClockControl, FALSE send the command to the connected endpoints; TRUE to forward the command to the Clock Generator then to all listeners.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination
virtual CPNS::Enums::Errors CPNS::IOutput::Clock_Tick ( CPNS::uint16 const  wTickCount)
pure virtual

Send a clock tick.

Remarks
Only available if the Output has the IOC_Clock capability
Parameters
[in]wTickCountOptional Tick count ([0..resolution-1], 0xFFFF if not applicable)
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_NotSupported | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_InvalidValue
virtual CPNS::Enums::Errors CPNS::IOutput::Flush ( )
pure virtual
virtual CPNS::Endpoint CPNS::IOutput::GetDestination ( CPNS::uint16 const  wDestinationIndex)
pure virtual

Get a destination.

Parameters
[in]wDestinationIndexIndex, from 0 to GetNumDestinations()-1
Returns
Destination's endpoint, or empty Endpoint if wDestinationIndex is out of range
virtual CPNS::Enums::DataConsumeModes CPNS::IOutput::GetDestinationDataConsumeMode ( )
pure virtual

Check if the destination is needing handshaking.

Related to MIDISysEx and CustomDataTransfer messages.

Returns
the destination DataConsume mode.
virtual CPNS::uint16 CPNS::IOutput::GetNumDestinations ( )
pure virtual

Get the number of destinations.

Returns
the number of destinations
virtual CPNS::uint16 CPNS::IOutput::GetOutputID ( ) const
pure virtual

Get the Output ID.

Returns
the Output ID
virtual CPNS::boolean CPNS::IOutput::HasDestinations ( )
pure virtual

Check if the Output has destinations.

Remarks
count the total number of destinations, even those for which the presence on the network is not yet validated.
Returns
TRUE if destination exists
virtual CPNS::boolean CPNS::IOutput::IsReadyToSend ( )
pure virtual

Check if the output is ready to send Part of the flow control sub-system.

Returns
TRUE if a message can be sent
virtual void CPNS::IOutput::RegisterClockGeneratorNotificationHandler ( CPNS::IOutput_ClockGeneratorNotificationHandler *const  pHandler)
pure virtual

Register an Output clock generator notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IOutput_ClockGeneratorNotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IOutput::RegisterNotificationHandler ( CPNS::IOutput_NotificationHandler *const  pHandler)
pure virtual

Register an Output notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IOutput_NotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual CPNS::Enums::Errors CPNS::IOutput::RemoveDestination ( CPNS::Endpoint const &  destination)
pure virtual

Remove a destination.

Warning
calling this method implicitly flush the output before performing the action.
Parameters
[in]destinationthe destination to be removed
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_ItemNotFound
virtual CPNS::Enums::Errors CPNS::IOutput::Send ( CPNS::IBaseMessage const *const  pMsg,
CPNS::boolean const  fFlush 
)
pure virtual

Send a message with flush control, allowing multipart messages.

If the device recording is armed and no time stamp specified yet, a system time stamp is automatically added to the message.

Parameters
[in]pMsgPointer to the message to send. This message object can be released as soon this method returns.
[in]fFlushIf 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.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_SentToNotYetValidatedDestination | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_NotReadyToSend | CPNS::Enums::ERR_Failed | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_TooManyRecordingDestinations | CPNS::Enums::ERR_MessageDontSupportMulticast
Remarks
If some destination is not yet validated, the method returns CPNS::Enums::ERR_SentToNotYetValidatedDestination. The message delivery is not guaranteed for those destinations.
virtual CPNS::Enums::Errors CPNS::IOutput::Send ( CPNS::IBaseMessage const *const  pMsg)
pure virtual

Send a message immediately.

If the device recording is armed and no time stamp specified yet, a system time stamp is automatically added to the message.

Parameters
[in]pMsgPointer to the message to send. This message object can be released as soon this method returns.
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_SentToNotYetValidatedDestination | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_NotReadyToSend | CPNS::Enums::ERR_Failed | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_TooManyRecordingDestinations | CPNS::Enums::ERR_MessageDontSupportMulticast
Remarks
If some destination is not yet validated, the method returns CPNS::Enums::ERR_SentToNotYetValidatedDestination. The message delivery is not guaranteed for those destinations.
virtual void CPNS::IOutput::SetCapabilities ( CPNS::CombinedInOutCapabilities const  caps)
pure virtual

Set the Output capabilities.

Parameters
[in]capsthe new capabilities
virtual CPNS::Enums::Errors CPNS::IOutput::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 
)
pure virtual

Send a multicast signal directed to all devices present in the destination set.

Only one signal per device is sent.

Remarks
This method send directed signals. So the signal number MUST have SIGB_Directed bit set
Parameters
[in]wSignalNumberStandard Signal numbers are available from CPNS::Enums::Signals
[in]wOptionalData0Optional value, depending on the signal number
[in]wOptionalData1Optional value, depending on the signal number
[in]wOptionalData2Optional value, depending on the signal number
[in]wOptionalData3Optional value, depending on the signal number
[in]utf8OptionalDataOptional value, depending on the signal number
[in]optionalEndpointOptional value, depending on the signal number
Returns
CPNS::Enums::ERR_None | CPNS::Enums::ERR_BadSignalType | CPNS::Enums::ERR_NoDestination | CPNS::Enums::ERR_TooManyDestinations | CPNS::Enums::ERR_Failed
virtual void CPNS::IOutput::UnregisterClockGeneratorNotificationHandler ( CPNS::IOutput_ClockGeneratorNotificationHandler *const  pHandler)
pure virtual

Unregister an Output clock generator notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IOutput_ClockGeneratorNotificationHandler. If pHandler is NULL, clear all registered handlers.
virtual void CPNS::IOutput::UnregisterNotificationHandler ( CPNS::IOutput_NotificationHandler *const  pHandler)
pure virtual

Unregister an Output notification handler.

Parameters
[in]pHandlerPointer to the application object implementing IOutput_NotificationHandler. If pHandler is NULL, clear all registered handlers.