cwEuCon.h/cpp : Added initial interface for communicating with an an application or UI.
This commit is contained in:
parent
efc1c27f85
commit
d505a4af5a
24
cwEuCon.cpp
24
cwEuCon.cpp
@ -714,6 +714,30 @@ cw::rc_t cw::eucon::exec( handle_t h, unsigned sockTimeOutMs )
|
||||
|
||||
}
|
||||
|
||||
bool cw::eucon::areMsgsWaiting( handle_t h )
|
||||
{
|
||||
eucon_t* p = _handleToPtr(h);
|
||||
}
|
||||
|
||||
cw::rc_t cw::eucon::getMsgs( handle_t h, msgCallback_t cbFunc, void* cbArg )
|
||||
{
|
||||
rc_t rc = kOkRC;
|
||||
eucon_t* p = _handleToPtr(h);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
cw::rc_t cw::eucon::sendCtlMsg( handle_t h, unsigned ctlTId, unsigned channel, unsigned ivalue, float fvalue )
|
||||
{
|
||||
rc_t rc = kOkRC;
|
||||
eucon_t* p = _handleToPtr(h);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
namespace cw
|
||||
{
|
||||
|
41
cwEuCon.h
41
cwEuCon.h
@ -13,7 +13,7 @@ namespace cw
|
||||
};
|
||||
|
||||
typedef handle<struct eucon_str> handle_t;
|
||||
|
||||
|
||||
typedef struct args_str
|
||||
{
|
||||
unsigned recvBufByteN; // Socket receive buffer size
|
||||
@ -25,9 +25,48 @@ namespace cw
|
||||
unsigned maxFaderBankN; // maximum number of fader banks to support
|
||||
} args_t;
|
||||
|
||||
// Create the EuCon simulation manager.
|
||||
rc_t create( handle_t& hRef, const args_t& a );
|
||||
|
||||
// Destroy the EuCon simulation manager.
|
||||
rc_t destroy( handle_t& hRef );
|
||||
|
||||
// Update the manager. This function polls the network socket
|
||||
// for incoming information from the FaderBankArray.
|
||||
rc_t exec( handle_t h, unsigned sockTimeOutMs );
|
||||
|
||||
// Are messages waiting
|
||||
bool areMsgsWaiting( handle_t h );
|
||||
|
||||
enum
|
||||
{
|
||||
kFaderValueTId,
|
||||
kMuteValueTId,
|
||||
kTouchValueTId
|
||||
};
|
||||
|
||||
typedef struct msg_str
|
||||
{
|
||||
unsigned msgTId;
|
||||
unsigned channel;
|
||||
union
|
||||
{
|
||||
int ivalue;
|
||||
float fvalue;
|
||||
} u;
|
||||
|
||||
} msg_t;
|
||||
|
||||
typedef void (*msgCallback_t)( void* cbArg, const msg_t* msg );
|
||||
|
||||
// Switches the internal double buffer and calls back with the parsed messages.
|
||||
rc_t getMsgs( handle_t h, msgCallback_t cbFunc, void* cbArg );
|
||||
|
||||
|
||||
// Send a message to a physical control
|
||||
rc_t sendCtlMsg( handle_t h, unsigned ctlTId, unsigned channel, unsigned ivalue, float fvalue );
|
||||
|
||||
|
||||
rc_t test();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user