|
|
@ -20,9 +20,9 @@ |
|
|
|
namespace xsync { |
|
|
|
using namespace std; |
|
|
|
|
|
|
|
typedef function<void(XsyncTimecode_t *timecode_msg)> xsync_on_timecode_msg_t; |
|
|
|
typedef function<void(uint32_t workstate)> xsync_on_workstate_change_msg_t; |
|
|
|
typedef function<void(xysnc_camera_sync_data_t *timecode_msg)> xsync_on_camera_sync_msg_t; |
|
|
|
typedef function<void(XsyncTimecode_t *timecode_msg)> xsync_on_timecode_msg_t; |
|
|
|
typedef function<void(uint32_t recordSig, XsyncTimecode_t *timecode_msg)> xsync_on_record_sig_change_msg_t; |
|
|
|
typedef function<void(xysnc_camera_sync_data_t *timecode_msg)> xsync_on_camera_sync_msg_t; |
|
|
|
|
|
|
|
class Xsync { |
|
|
|
public: |
|
|
@ -37,9 +37,9 @@ class Xsync { |
|
|
|
string m_xsync_ip; |
|
|
|
bool m_is_connected = false; |
|
|
|
|
|
|
|
xsync_on_camera_sync_msg_t m_on_camera_sync_msg_cb = nullptr; |
|
|
|
xsync_on_timecode_msg_t m_on_timecode_msg_cb = nullptr; |
|
|
|
xsync_on_workstate_change_msg_t m_on_workstate_change_msg_cb = nullptr; |
|
|
|
xsync_on_camera_sync_msg_t m_on_camera_sync_msg_cb = nullptr; |
|
|
|
xsync_on_timecode_msg_t m_on_timecode_msg_cb = nullptr; |
|
|
|
xsync_on_record_sig_change_msg_t m_on_record_sig_change_msg_cb = nullptr; |
|
|
|
|
|
|
|
int txpacket_index = 0; |
|
|
|
|
|
|
@ -61,9 +61,9 @@ class Xsync { |
|
|
|
xsync_net_state_t getNetState(); |
|
|
|
bool ping(string xsync_ip); |
|
|
|
|
|
|
|
void registerOnTimecodeMsgCallback(xsync_on_timecode_msg_t on_timecode_msg_cb); |
|
|
|
void registerOnCameraSyncMsgCallback(xsync_on_camera_sync_msg_t on_camera_sync_msg_cb); |
|
|
|
void registerOnWorkstateChangeMsgCallback(xsync_on_workstate_change_msg_t on_workstate_change_msg_cb); |
|
|
|
void registerOnTimecodeMsgCallback(xsync_on_timecode_msg_t cb); |
|
|
|
void registerOnCameraSyncMsgCallback(xsync_on_camera_sync_msg_t cb); |
|
|
|
void registerOnRecordSigChangeMsgCallback(xsync_on_record_sig_change_msg_t cb); |
|
|
|
|
|
|
|
xs_error_code_t reg_write(uint32_t regadd, uint32_t regvalue, uint32_t ®backvalue, int32_t overtime_ms = 100); |
|
|
|
xs_error_code_t reg_write(uint32_t regadd, uint32_t regvalue, int32_t overtime_ms = 100); |
|
|
@ -445,6 +445,7 @@ class Xsync { |
|
|
|
*/ |
|
|
|
xs_error_code_t RecordSigGenerator_getRecordState(uint32_t &state); |
|
|
|
xs_error_code_t RecordSigGenerator_readTimecodeSnapshot(XsyncTimecode_t &timecode); |
|
|
|
|
|
|
|
private: |
|
|
|
xs_error_code_t doaction(uint32_t action, uint32_t actionval, uint32_t *ackreturn, int32_t overtime_ms = 100); |
|
|
|
xs_error_code_t storageConfig(); |
|
|
|