李勇

修改白板数据同步的pdu结构和对外接口的参数

@@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
73 /******/ } 73 /******/ }
74 74
75 /******/ var hotApplyOnUpdate = true; 75 /******/ var hotApplyOnUpdate = true;
76 -/******/ var hotCurrentHash = "0da528f08f5e38a35aac"; // eslint-disable-line no-unused-vars 76 +/******/ var hotCurrentHash = "3af99f42f38f1797dd2c"; // eslint-disable-line no-unused-vars
77 /******/ var hotCurrentModuleData = {}; 77 /******/ var hotCurrentModuleData = {};
78 /******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars 78 /******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
79 79
@@ -1867,6 +1867,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -1867,6 +1867,7 @@ return /******/ (function(modules) { // webpackBootstrap
1867 1867
1868 //APE 1868 //APE
1869 MessageTypes.ERR_APE_SEND_FAILED_NO_JOIN = 500; //APE在sdk为初始化或未加入会议之前调用发送数据接口 1869 MessageTypes.ERR_APE_SEND_FAILED_NO_JOIN = 500; //APE在sdk为初始化或未加入会议之前调用发送数据接口
  1870 + MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG = 501; //APE在接口调用时参数错误
1870 1871
1871 var _default = MessageTypes; 1872 var _default = MessageTypes;
1872 exports.default = _default; 1873 exports.default = _default;
@@ -13455,7 +13456,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -13455,7 +13456,7 @@ return /******/ (function(modules) { // webpackBootstrap
13455 Object.defineProperty(exports, "__esModule", { 13456 Object.defineProperty(exports, "__esModule", {
13456 value: true 13457 value: true
13457 }); 13458 });
13458 - var _default = "\n//start\n// pdu_def.proto\n\n// syntax = \"proto3\";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n DP_TOP = 0;\n DP_HIGH = 1;\n DP_MEDIUM = 2;\n DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n SEG_BEGIN = 0;\n SEG_END = 1;\n SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n TS_NOT_IN_USE = 0;\n TS_SELF_GRABBED = 1;\n TS_OTHER_GRABBED = 2;\n TS_SELF_INHIBITED = 3;\n TS_OTHER_INHIBITED = 4;\n TS_SELF_RECIPIENT = 5;\n TS_SELF_GIVING = 6;\n TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n RCPDU_ROSTER_UPDATE_INDICATION = 60;\n RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n // MCS PDU\n RCPDU_SESSION_JOIN_REQUEST = 90;\n RCPDU_SESSION_JOIN_RESPONSE = 91;\n RCPDU_CHANNEL_GRAB_REQUEST = 100;\n RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n RCPDU_CHANNEL_GRAB_INDICATION = 102;\n RCPDU_CHANNEL_JOIN_REQUEST = 103;\n RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n RCPDU_SEND_DATA_REQUEST = 120;\n RCPDU_SEND_DATA_INDICATION = 121;\n RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n RCPDU_TOKEN_GRAB_REQUEST = 130;\n RCPDU_TOKEN_GRAB_CONFIRM = 131;\n RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n RCPDU_TOKEN_GIVE_REQUEST = 134;\n RCPDU_TOKEN_GIVE_INDICATION = 135;\n RCPDU_TOKEN_GIVE_RESPONSE = 136;\n RCPDU_TOKEN_GIVE_CONFIRM = 137;\n RCPDU_TOKEN_PLEASE_REQUEST = 138;\n RCPDU_TOKEN_PLEASE_INDICATION = 139;\n RCPDU_TOKEN_RELEASE_REQUEST = 140;\n RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n RCPDU_TOKEN_TEST_REQUEST = 142;\n RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n // Registry PDU\n RCPDU_REG_REGISTER_KEY = 200;\n RCPDU_REG_UNREGISTER_KEY = 201;\n RCPDU_REG_REGISTER_ROSTER = 202;\n RCPDU_REG_REGISTER_TOKEN = 203;\n RCPDU_REG_REGISTER_PARAMETER = 204;\n RCPDU_REG_REGISTER_COUNTER = 205;\n RCPDU_REG_REGISTER_TABLE = 206;\n RCPDU_REG_REGISTER_CACHE = 207;\n RCPDU_REG_REGISTER_OBJ = 208;\n RCPDU_REG_UNREGISTER_OBJ = 209;\n RCPDU_REG_UPDATE_OBJ = 210;\n RCPDU_REG_ADAPTER = 211;\n RCPDU_REG_CLEANUP_NODE = 212;\n RCPDU_REG_REGISTER_QUEUE = 213;\n\n // Registry Obj update PDU\n RCPDU_REG_TABLE_INSERT_PDU = 230;\n RCPDU_REG_TABLE_DELETE_PDU = 231;\n RCPDU_REG_TABLE_UPDATE_PDU = 232;\n RCPDU_REG_ROSTER_INSERT_PDU = 240;\n RCPDU_REG_ROSTER_DELETE_PDU = 241;\n RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n RCPDU_REG_QUEUE_INSERT_PDU = 255;\n RCPDU_REG_QUEUE_DELETE_PDU = 256;\n RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n // data\n RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n RCPDU_VOTING_POLL_RECORD = 265;\n\n // Registry resource request or response PDU\n RCPDU_REG_REQUEST_OBJ = 290;\n RCPDU_REG_RESPONSE_OBJ = 291;\n RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n // Index exchange\n RCPDU_INDEX_ADAPTER = 300;\n RCPDU_INDEX_SERVER_USERS = 301;\n RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n RCPDU_INDEX_CONFERENCE_USERS = 304;\n}\n\nenum RCPduNodeType_E {\n NT_TERMINAL = 0;\n NT_MULTIPORT_TERMINAL = 1;\n NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n RSN_USERINITIATED = 0;\n RSN_DISCONNECTED = 1;\n RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n RET_SUCCESS = 0;\n RET_USER_REJECTED = 1;\n RET_INVALID_CONFERENCE = 2;\n RET_INVALID_PASSWORD = 3;\n RET_INVALID_CONVENER_PASSWORD = 4;\n RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n RET_INVALID_CHALLENGE_RESPONSE = 6;\n RET_NO_CONNECTION = 7;\n RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n NC_CONVENTIONAL = 0;\n NC_COUNTED = 1;\n NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n required uint32 id = 1;\n required bytes name = 2;\n optional bytes description = 3;\n //optional string net_address = 4;\n optional uint32 mode = 4;\n optional string password = 5;\n optional uint32 capacity = 6;\n optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n required uint32 id = 1;\n optional uint32 superior_node = 2;\n required RCPduNodeType_E type = 3;\n required string name = 4;\n required uint32 capability = 5;\n optional string net_address = 6;\n optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n required uint32 id = 1; // session id\n required string name = 2;\n required string tag = 3;\n repeated uint32 channel_ids = 4 [packed = true];\n optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n optional RCPduType_E type = 1;\n required uint32 obj_id = 2;\n required string name = 3;\n required string tag = 4;\n optional uint32 owner = 5;\n optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n required RCPduType_E type = 1;\n required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n required uint32 item_idx = 1;\n required uint32 owner = 2;\n required bytes item_data = 3;\n optional uint32 register_obj_id=4;\n}\n\nmessage RCRegistryTableInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryWBItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryRosterInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryWBUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCWhiteboardDataRequestPdu items = 2;\n}\n//message RCCleanupNodePdu\n//{\n// optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];\n// required uint32 node_id = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n required uint32 value = 2 [default = 0];\n optional uint32 begin_bit = 3 [default = 31];\n optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n required uint32 owner = 1;\n required uint32 item_id = 2;\n optional bytes item_data = 3;\n optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n required uint32 start = 2;\n required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes session_data = 5; //\u805A\u5408\u5728\u4E00\u8D77\u7684registry\u4FE1\u606F\n}\n\nmessage RCSessionJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n required uint32 id = 2;\n optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n required uint32 initiator = 2;\n optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n required uint32 initiator = 2;\n repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n required RCPduType_E sub_type = 2;\n required uint32 initiator = 3;\n required uint32 conf_id = 4;\n required uint32 session_id = 5;\n required uint32 channel_id = 6;\n required bool upward = 7;\n required bool reliability = 8;\n required RCPduPriority_E priority = 9;\n required bytes data = 10;\n optional uint32 peer = 11;\n optional RCPduSegment_E seg = 12;\n optional uint32 total_size = 13;\n optional uint32 site_id = 14;\n optional string user_id = 15;\n optional string user_name = 16;\n optional string user_role = 17;\n optional string device_type = 18;\n optional string site = 19;\n}\n\n// Token management\nmessage RCTokenGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n required uint32 initiator = 2;\n required RCPduNodeType_E node_type = 3;\n required RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n required uint32 conf_id = 2;\n required RCPduResult_E result = 3;\n optional RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n required uint32 initiator = 2;\n required RCConferenceDescriptorPdu conf_desc = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n required RCPduResult_E result = 2;\n optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n required uint32 ejected_node_id = 2;\n required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n required bool full_refresh = 2; // Conference Roster and all\n repeated RCNodeRecordPdu node_record = 3;\n repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n}\n\nmessage RCChatSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n required uint32 from_role = 5;\n required bytes from_name = 6;\n}\n\nmessage RCChatSendH5DataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required string user_data = 4;\n required string from_role = 5;\n required string from_name = 6;\n}\n\nmessage RCDocSendDataRequestPdu {\n required int32 id = 1;\n required string doc_type = 2;\n required string uri = 3;\n optional int32 owner = 4;\n optional int32 from = 5;\n optional string name = 6;\n optional int32 cur_page_no = 7;\n optional int32 cur_H = 8;\n optional int32 cur_V = 9;\n optional int32 scale = 10;\n optional int32 page_num = 11;\n}\n\nmessage RCGiftSendDataRequestPdu {\n optional uint32 initiator = 1;\n required uint32 peer = 2;\n required uint32 index = 3;\n required uint32 num = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bytes user_data = 2;\n}\n\nmessage RCVideoSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bool key_frame = 2;\n required uint32 sequence_id = 3;\n required uint32 slice_id = 4;\n required bytes user_data = 5;\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n required uint32 status = 1;\n required uint32 device_id = 2;\n required uint32 framerate = 3;\n required uint32 bitrate = 4;\n required uint32 codec = 5;\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n optional uint32 status = 1;\n optional uint32 device_id = 2;\n optional uint32 width = 3;\n optional uint32 height = 4;\n optional uint32 framerate = 5;\n optional uint32 bitrate = 6;\n optional uint32 codec = 7;\n optional string peer_id = 8;\n optional string url = 9;\n optional uint32 type = 10;\n optional string shamlive = 11;\n optional uint32 livetype = 12;\n optional uint32 releaseGrab = 13;\n optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCNodeInfoRecordPdu {\n required uint32 node_id = 1;\n required string name = 2;\n required uint32 role = 3;\n required uint32 level = 4;\n repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n optional uint32 status = 7;\n optional bytes user_data = 8;\n optional string user_id = 9;\n optional uint32 handUpTime = 10;\n optional uint32 deviceType = 11;\n optional uint32 mobileDirection = 12;\n}\n\nmessage RCVotingPollSettingsPdu {\n required bool timer = 1;\n optional uint32 time_limit = 2;\n optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n required string title = 1;\n required string content = 2;\n optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n required uint32 index = 1;\n required uint32 type = 2;\n required string title = 3;\n repeated string options = 4;\n optional uint32 score = 5;\n optional uint32 time_limit = 6;\n optional string restrict_input = 7;\n optional uint32 char_limit = 8;\n optional string answer = 9;\n repeated uint32 selections = 10;\n repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n required RCVotingPollSettingsPdu settings = 1;\n required string title = 2;\n repeated RCVotingPollResultPdu results = 3;\n repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n optional string qq = 1;\n optional string skype = 2;\n optional string mobile = 3;\n}\nmessage RCTabUpdateDataRequestPdu {\n optional uint32 id = 1;\n optional bytes action = 2;\n optional uint32 uncomprLen =3;\n}\n\nmessage RCWhiteboardDataRequestPdu {\n required uint32 id = 1;\n required uint32 type = 2;\n required uint32 initiator = 3;\n optional bytes action = 4;\n optional uint32 uncomprLen = 5;\n}\n\nmessage RCWhiteBoardData {\n required uint32 id= 1;\n required uint32 initiator=2;\n optional string data= 3;\n optional uint32 type= 4;\n}\n\n//end\n"; 13459 + var _default = "\n//start\n// pdu_def.proto\n\n// syntax = \"proto3\";\n\noption optimize_for = LITE_RUNTIME;\nenum RCPduPriority_E {\n DP_TOP = 0;\n DP_HIGH = 1;\n DP_MEDIUM = 2;\n DP_LOW = 3;\n}\n\nenum RCPduSegment_E {\n SEG_BEGIN = 0;\n SEG_END = 1;\n SEG_ONCE = 2;\n}\n\nenum RCPduTokenStatus_E {\n TS_NOT_IN_USE = 0;\n TS_SELF_GRABBED = 1;\n TS_OTHER_GRABBED = 2;\n TS_SELF_INHIBITED = 3;\n TS_OTHER_INHIBITED = 4;\n TS_SELF_RECIPIENT = 5;\n TS_SELF_GIVING = 6;\n TS_OTHER_GIVING = 7;\n}\n\nenum RCPduType_E {\n// GCC PDU\n RCPDU_CONNECT_PROVIDER_REQUEST = 0;\n RCPDU_CONNECT_PROVIDER_RESPONSE = 1;\n RCPDU_CONFERENCE_JOIN_REQUEST = 2;\n RCPDU_CONFERENCE_JOIN_RESPONSE = 3;\n RCPDU_CONFERENCE_INVITE_REQUEST = 10;\n RCPDU_CONFERENCE_INVITE_RESPONSE = 11;\n RCPDU_CONFERENCE_LOCK_REQUEST = 20;\n RCPDU_CONFERENCE_LOCK_RESPONSE = 21;\n RCPDU_CONFERENCE_LOCK_INDICATION = 22;\n RCPDU_CONFERENCE_UNLOCK_REQUEST = 30;\n RCPDU_CONFERENCE_UNLOCK_RESPONSE = 31;\n RCPDU_CONFERENCE_UNLOCK_INDICATION = 32;\n RCPDU_CONFERENCE_LEAVE_REQUEST = 39;\n RCPDU_CONFERENCE_TERMINATE_REQUEST = 40;\n RCPDU_CONFERENCE_TERMINATE_RESPONSE = 41;\n RCPDU_CONFERENCE_TERMINATE_INDICATION = 42;\n RCPDU_CONFERENCE_EJECT_USER_REQUEST = 50;\n RCPDU_CONFERENCE_EJECT_USER_RESPONSE = 51;\n RCPDU_CONFERENCE_EJECT_USER_INDICATION = 52;\n RCPDU_ROSTER_UPDATE_INDICATION = 60;\n RCPDU_REGISTRY_UPDATE_REQUEST = 70; // INCLUDE ALL OBJS OPERATION\n RCPDU_REGISTRY_UPDATE_RESPONSE = 71;\n RCPDU_REGISTRY_UPDATE_INDICATION = 72;\n RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE = 80;\n\n // MCS PDU\n RCPDU_SESSION_JOIN_REQUEST = 90;\n RCPDU_SESSION_JOIN_RESPONSE = 91;\n RCPDU_CHANNEL_GRAB_REQUEST = 100;\n RCPDU_CHANNEL_GRAB_RESPONSE = 101;\n RCPDU_CHANNEL_GRAB_INDICATION = 102;\n RCPDU_CHANNEL_JOIN_REQUEST = 103;\n RCPDU_CHANNEL_JOIN_RESPONSE = 104;\n RCPDU_CHANNEL_LEAVE_REQUEST = 105;\n RCPDU_CHANNEL_RELEASE_REQUEST = 106;\n RCPDU_CHANNEL_RELEASE_INDICATION = 107;\n RCPDU_SEND_DATA_REQUEST = 120;\n RCPDU_SEND_DATA_INDICATION = 121;\n RCPDU_UNIFORM_SEND_DATA_REQUEST = 125;\n RCPDU_UNIFORM_SEND_DATA_INDICATION = 126;\n RCPDU_TOKEN_GRAB_REQUEST = 130;\n RCPDU_TOKEN_GRAB_CONFIRM = 131;\n RCPDU_TOKEN_INHIBIT_REQUEST = 132;\n RCPDU_TOKEN_INHIBIT_CONFIRM = 133;\n RCPDU_TOKEN_GIVE_REQUEST = 134;\n RCPDU_TOKEN_GIVE_INDICATION = 135;\n RCPDU_TOKEN_GIVE_RESPONSE = 136;\n RCPDU_TOKEN_GIVE_CONFIRM = 137;\n RCPDU_TOKEN_PLEASE_REQUEST = 138;\n RCPDU_TOKEN_PLEASE_INDICATION = 139;\n RCPDU_TOKEN_RELEASE_REQUEST = 140;\n RCPDU_TOKEN_RELEASE_CONFIRM = 141;\n RCPDU_TOKEN_TEST_REQUEST = 142;\n RCPDU_TOKEN_TEST_CONFIRM = 143;\n\n // Registry PDU\n RCPDU_REG_REGISTER_KEY = 200;\n RCPDU_REG_UNREGISTER_KEY = 201;\n RCPDU_REG_REGISTER_ROSTER = 202;\n RCPDU_REG_REGISTER_TOKEN = 203;\n RCPDU_REG_REGISTER_PARAMETER = 204;\n RCPDU_REG_REGISTER_COUNTER = 205;\n RCPDU_REG_REGISTER_TABLE = 206;\n RCPDU_REG_REGISTER_CACHE = 207;\n RCPDU_REG_REGISTER_OBJ = 208;\n RCPDU_REG_UNREGISTER_OBJ = 209;\n RCPDU_REG_UPDATE_OBJ = 210;\n RCPDU_REG_ADAPTER = 211;\n RCPDU_REG_CLEANUP_NODE = 212;\n RCPDU_REG_REGISTER_QUEUE = 213;\n\n // Registry Obj update PDU\n RCPDU_REG_TABLE_INSERT_PDU = 230;\n RCPDU_REG_TABLE_DELETE_PDU = 231;\n RCPDU_REG_TABLE_UPDATE_PDU = 232;\n RCPDU_REG_ROSTER_INSERT_PDU = 240;\n RCPDU_REG_ROSTER_DELETE_PDU = 241;\n RCPDU_REG_ROSTER_UPDATE_PDU = 242;\n RCPDU_REG_PARAMETER_UPDATE_PDU = 250;\n RCPDU_REG_QUEUE_INSERT_PDU = 255;\n RCPDU_REG_QUEUE_DELETE_PDU = 256;\n RCPDU_REG_QUEUE_UPDATE_PDU = 257;\n\n // data\n RCPDU_CONFERENCE_SEND_DATA_REQUEST = 259;\n RCPDU_VIDEO_SEND_DATA_REQUEST = 260;\n RCPDU_AUDIO_SEND_DATA_REQUEST = 261;\n RCPDU_GIFT_SEND_DATA_REQUEST = 262;\n RCPDU_CHAT_SEND_DATA_REQUEST = 263;\n RCPDU_VOTING_POLL_RECORD = 265;\n\n // Registry resource request or response PDU\n RCPDU_REG_REQUEST_OBJ = 290;\n RCPDU_REG_RESPONSE_OBJ = 291;\n RCPDU_REG_COUNTER_REQUEST_PDU = 292;\n RCPDU_REG_COUNTER_RESPONSE_PDU = 293;\n\n // Index exchange\n RCPDU_INDEX_ADAPTER = 300;\n RCPDU_INDEX_SERVER_USERS = 301;\n RCPDU_INDEX_CONFERENCE_USER_JOINED = 302;\n RCPDU_INDEX_CONFERENCE_USER_EXITED = 303;\n RCPDU_INDEX_CONFERENCE_USERS = 304;\n}\n\nenum RCPduNodeType_E {\n NT_TERMINAL = 0;\n NT_MULTIPORT_TERMINAL = 1;\n NT_MCU = 2;\n}\n\nenum RCPduReason_E {\n RSN_USERINITIATED = 0;\n RSN_DISCONNECTED = 1;\n RSN_SUPER_LEFT = 2;\n}\n\nenum RCPduResult_E {\n RET_SUCCESS = 0;\n RET_USER_REJECTED = 1;\n RET_INVALID_CONFERENCE = 2;\n RET_INVALID_PASSWORD = 3;\n RET_INVALID_CONVENER_PASSWORD = 4;\n RET_CHALLENGE_RESPONSE_REQUIRED = 5;\n RET_INVALID_CHALLENGE_RESPONSE = 6;\n RET_NO_CONNECTION = 7;\n RET_FULL_CAPACITY = 8;\n}\n\nenum RCPduNodeCategory_E {\n NC_CONVENTIONAL = 0;\n NC_COUNTED = 1;\n NC_ANONYMOUS = 2;\n}\n\nmessage RCConferenceDescriptorPdu {\n required uint32 id = 1;\n required bytes name = 2;\n optional bytes description = 3;\n //optional string net_address = 4;\n optional uint32 mode = 4;\n optional string password = 5;\n optional uint32 capacity = 6;\n optional bytes user_data = 7;\n}\n\nmessage RCNodeRecordPdu {\n required uint32 id = 1;\n optional uint32 superior_node = 2;\n required RCPduNodeType_E type = 3;\n required string name = 4;\n required uint32 capability = 5;\n optional string net_address = 6;\n optional RCPduNodeCategory_E category = 7;\n}\n\nmessage RCApplicationRecordPdu {\n required uint32 id = 1; // session id\n required string name = 2;\n required string tag = 3;\n repeated uint32 channel_ids = 4 [packed = true];\n optional uint32 capability = 5;\n}\n\n//reg.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCRegistryRegisterKeyPdu {\n required RCPduType_E type = 1 [default = RCPDU_REG_REGISTER_KEY];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCRegistryUnregisterKeyPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_KEY];\n required uint32 key_id = 2;\n}\n\nmessage RCRegistryRegisterObjPdu {\n optional RCPduType_E type = 1;\n required uint32 obj_id = 2;\n required string name = 3;\n required string tag = 4;\n optional uint32 owner = 5;\n optional bytes user_data = 6;\n}\n\nmessage RCRegistryUnregisterObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UNREGISTER_OBJ];\n required uint32 obj_id = 2;\n}\n\nmessage RCRegistryUpdateObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_UPDATE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCAdapterItemPdu {\n required RCPduType_E type = 1;\n required bytes item_data = 2;\n}\n\n// adapter pdu that used to package a list of pdu.\nmessage RCAdapterPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ADAPTER];\n repeated RCAdapterItemPdu item = 2;\n}\n\n// table operation pdu\nmessage RCRegistryTableItemPdu {\n required uint32 item_idx = 1;\n required uint32 owner = 2;\n required bytes item_data = 3;\n optional uint32 register_obj_id=4;\n}\n\nmessage RCRegistryTableInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_INSERT_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\nmessage RCRegistryTableDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];\n repeated uint32 item_idx = 2;\n}\n\nmessage RCRegistryTableUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];\n repeated RCRegistryTableItemPdu items = 2;\n}\n\n// roster operation pdu\nmessage RCRegistryRosterItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryWBItemPdu {\n required uint32 node_id = 1;\n required bytes node_data = 2;\n}\nmessage RCRegistryRosterInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_INSERT_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\nmessage RCRegistryRosterDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_DELETE_PDU];\n required uint32 node_id = 2;\n}\n\nmessage RCRegistryRosterUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_ROSTER_UPDATE_PDU];\n repeated RCRegistryRosterItemPdu items = 2;\n}\n\n//message RCCleanupNodePdu\n//{\n// optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];\n// required uint32 node_id = 2;\n//}\n\n// parameter operation pdu\nmessage RCRegistryParameterUpdatePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_PARAMETER_UPDATE_PDU];\n required uint32 value = 2 [default = 0];\n optional uint32 begin_bit = 3 [default = 31];\n optional uint32 end_bit = 4;\n}\n\n// queue operation pdu\nmessage RCRegistryQueueItemPdu {\n required uint32 owner = 1;\n required uint32 item_id = 2;\n optional bytes item_data = 3;\n optional uint32 item_idx = 4;\n}\n\nmessage RCRegstryQueueInsertItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_INSERT_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryQueueDeleteItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_DELETE_PDU];\n required uint32 item_id = 2;\n}\n\nmessage RCRegistryQueueUpdateItemPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_QUEUE_UPDATE_PDU];\n repeated RCRegistryQueueItemPdu items = 2;\n}\n\nmessage RCRegistryRequestObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_REQUEST_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryResponseObjPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_RESPONSE_OBJ];\n required RCPduType_E sub_type = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryCounterRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_REQUEST_PDU];\n required uint32 count = 2;\n}\n\nmessage RCRegistryCounterResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_REG_COUNTER_RESPONSE_PDU];\n required uint32 start = 2;\n required uint32 end = 3;\n}\n\n// mcs\noption optimize_for = LITE_RUNTIME;\n\n// Session management\nmessage RCSessionJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_REQUEST];\n required uint32 id = 2;\n required string name = 3;\n required string tag = 4;\n optional bytes session_data = 5; //\u805A\u5408\u5728\u4E00\u8D77\u7684registry\u4FE1\u606F\n}\n\nmessage RCSessionJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_SESSION_JOIN_RESPONSE];\n required uint32 id = 2;\n optional bytes response_data = 3;\n}\n\n// Channel management\nmessage RCChannelGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelGrabResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n optional uint32 channel_id = 5;\n}\n\nmessage RCChannelGrabIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_GRAB_INDICATION];\n required uint32 initiator = 2;\n optional uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_JOIN_RESPONSE];\n required uint32 initiator = 2;\n required uint32 requested_channel_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCChannelLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_LEAVE_REQUEST];\n required uint32 initiator = 2;\n repeated uint32 channel_ids = 3 [packed = true];\n}\n\nmessage RCChannelReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CHANNEL_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\nmessage RCChannelReleaseIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CHANNEL_RELEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 channel_id = 3;\n}\n\n// Data transfer\nmessage RCSendDataPdu {\n required RCPduType_E type = 1 [default = RCPDU_SEND_DATA_REQUEST];\n required RCPduType_E sub_type = 2;\n required uint32 initiator = 3;\n required uint32 conf_id = 4;\n required uint32 session_id = 5;\n required uint32 channel_id = 6;\n required bool upward = 7;\n required bool reliability = 8;\n required RCPduPriority_E priority = 9;\n required bytes data = 10;\n optional uint32 peer = 11;\n optional RCPduSegment_E seg = 12;\n optional uint32 total_size = 13;\n optional uint32 site_id = 14;\n optional string user_id = 15;\n optional string user_name = 16;\n optional string user_role = 17;\n optional string device_type = 18;\n optional string site = 19;\n}\n\n// Token management\nmessage RCTokenGrabRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenGrabConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GRAB_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenInhibitRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenInhibitConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_INHIBIT_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenGiveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required uint64 recipient = 4;\n}\n\nmessage RCTokenGiveResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_RESPONSE];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCTokenGiveConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_GIVE_CONFIRM];\n required uint32 token_id = 2;\n required uint64 recipient = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenPleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenPleaseIndicationPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_PLEASE_INDICATION];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_RELEASE_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenReleaseConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduResult_E result = 4;\n required RCPduTokenStatus_E status = 5;\n}\n\nmessage RCTokenTestRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_REQUEST];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n}\n\nmessage RCTokenTestConfirmPdu {\n optional RCPduType_E type = 1 [default = RCPDU_TOKEN_TEST_CONFIRM];\n required uint32 initiator = 2;\n required uint32 token_id = 3;\n required RCPduTokenStatus_E status = 4;\n}\n\n//gcc.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceJoinRequestPdu {\n required RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_REQUEST];\n required uint32 initiator = 2;\n required RCPduNodeType_E node_type = 3;\n required RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceJoinResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_JOIN_RESPONSE];\n required uint32 conf_id = 2;\n required RCPduResult_E result = 3;\n optional RCConferenceDescriptorPdu conf_desc = 4;\n}\n\nmessage RCConferenceInviteRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_INVITE_REQUEST];\n required uint32 initiator = 2;\n required RCConferenceDescriptorPdu conf_desc = 3;\n}\n\nmessage RCConferenceInviteResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_INVITE_RESPONSE];\n required RCPduResult_E result = 2;\n optional bytes user_data = 3;\n}\n\nmessage RCConferenceLockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_REQUEST];\n}\n\nmessage RCConferenceLockResponsePdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceLockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_LOCK_INDICATION];\n}\n\nmessage RCConferenceUnlockRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_UNLOCK_REQUEST];\n}\n\nmessage RCConferenceUnlockResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceUnlockIndicationPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_UNLOCK_INDICATION];\n}\n\nmessage RCConferenceLeaveRequestPdu {\n optional RCPduType_E type = 1 [default = RCPDU_CONFERENCE_LEAVE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateRequestPdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_REQUEST];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceTerminateResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_RESPONSE];\n required RCPduResult_E result = 2;\n}\n\nmessage RCConferenceTerminateIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_TERMINATE_INDICATION];\n required RCPduReason_E reason = 2;\n}\n\nmessage RCConferenceEjectUserRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_REQUEST];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCConferenceEjectUserResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_RESPONSE];\n required uint32 ejected_node_id = 2;\n required RCPduResult_E result = 3;\n}\n\nmessage RCConferenceEjectUserIndicationPdu { // MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1\n [default = RCPDU_CONFERENCE_EJECT_USER_INDICATION];\n required uint32 ejected_node_id = 2;\n required RCPduReason_E reason = 3;\n}\n\nmessage RCRosterUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel or\n// MCS_Uniform_Send_Data on GCC_Broadcast_Channel\n optional RCPduType_E type = 1 [default = RCPDU_ROSTER_UPDATE_INDICATION];\n required bool full_refresh = 2; // Conference Roster and all\n repeated RCNodeRecordPdu node_record = 3;\n repeated RCApplicationRecordPdu app_record = 4;\n}\n\nmessage RCRegistryUpdateRequestPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_REQUEST];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateIndicationPdu { // MCS_Send_Data on Node ID Channel of Top GCC\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_RESPONSE];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required bytes user_data = 4;\n}\n\nmessage RCRegistryUpdateResponsePdu { // MCS_Send_Data on Node ID Channel of requester\n optional RCPduType_E type = 1 [default = RCPDU_REGISTRY_UPDATE_INDICATION];\n required uint32 key_id = 2;\n required uint32 obj_id = 3;\n required RCPduResult_E result = 4;\n}\n\nmessage RCFunctionNotSupportedResponsePdu {\n optional RCPduType_E type = 1\n [default = RCPDU_FUNCTION_NOT_SUPPORTED_RESPONSE];\n required uint32 request_pdu_id = 2;\n}\n\n//ape.proto\n\noption optimize_for = LITE_RUNTIME;\nmessage RCConferenceSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n}\n\nmessage RCChatSendDataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required bytes user_data = 4;\n required uint32 from_role = 5;\n required bytes from_name = 6;\n}\n\nmessage RCChatSendH5DataRequestPdu {\n optional uint32 initiator = 1;\n optional uint32 peer = 2;\n required bool is_public = 3;\n required string user_data = 4;\n required string from_role = 5;\n required string from_name = 6;\n}\n\nmessage RCDocSendDataRequestPdu {\n required int32 id = 1;\n required string doc_type = 2;\n required string uri = 3;\n optional int32 owner = 4;\n optional int32 from = 5;\n optional string name = 6;\n optional int32 cur_page_no = 7;\n optional int32 cur_H = 8;\n optional int32 cur_V = 9;\n optional int32 scale = 10;\n optional int32 page_num = 11;\n}\n\nmessage RCGiftSendDataRequestPdu {\n optional uint32 initiator = 1;\n required uint32 peer = 2;\n required uint32 index = 3;\n required uint32 num = 4;\n optional bytes user_data = 5;\n}\n\nmessage RCAudioSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bytes user_data = 2;\n}\n\nmessage RCVideoSendDataRequestPdu {\n optional uint32 initiator = 1;\n required bool key_frame = 2;\n required uint32 sequence_id = 3;\n required uint32 slice_id = 4;\n required bytes user_data = 5;\n}\n\nmessage RCAudioChannelInfoRecordPdu {\n required uint32 status = 1;\n required uint32 device_id = 2;\n required uint32 framerate = 3;\n required uint32 bitrate = 4;\n required uint32 codec = 5;\n}\n\nmessage RCVideoChannelInfoRecordPdu {\n optional uint32 status = 1;\n optional uint32 device_id = 2;\n optional uint32 width = 3;\n optional uint32 height = 4;\n optional uint32 framerate = 5;\n optional uint32 bitrate = 6;\n optional uint32 codec = 7;\n optional string peer_id = 8;\n optional string url = 9;\n optional uint32 type = 10;\n optional string shamlive = 11;\n optional uint32 livetype = 12;\n optional uint32 releaseGrab = 13;\n optional string curTime = 14;\n}\n\nmessage RCAudioDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCVideoDeviceInfoRecordPdu {\n required uint32 device_id = 1;\n required string device_name = 2;\n}\n\nmessage RCNodeInfoRecordPdu {\n required uint32 node_id = 1;\n required string name = 2;\n required uint32 role = 3;\n required uint32 level = 4;\n repeated RCAudioDeviceInfoRecordPdu audio_records = 5;\n repeated RCVideoDeviceInfoRecordPdu video_records = 6;\n optional uint32 status = 7;\n optional bytes user_data = 8;\n optional string user_id = 9;\n optional uint32 handUpTime = 10;\n optional uint32 deviceType = 11;\n optional uint32 mobileDirection = 12;\n}\n\nmessage RCVotingPollSettingsPdu {\n required bool timer = 1;\n optional uint32 time_limit = 2;\n optional uint32 total_score = 3;\n}\n\nmessage RCVotingPollResultPdu {\n required string title = 1;\n required string content = 2;\n optional uint32 score = 3;\n}\n\nmessage RCVotingPollQuestionPdu {\n required uint32 index = 1;\n required uint32 type = 2;\n required string title = 3;\n repeated string options = 4;\n optional uint32 score = 5;\n optional uint32 time_limit = 6;\n optional string restrict_input = 7;\n optional uint32 char_limit = 8;\n optional string answer = 9;\n repeated uint32 selections = 10;\n repeated string responses = 11;\n}\n\nmessage RCVotingPollRecordPdu {\n required RCVotingPollSettingsPdu settings = 1;\n required string title = 2;\n repeated RCVotingPollResultPdu results = 3;\n repeated RCVotingPollQuestionPdu questions = 4;\n}\n\nmessage RCNodeInfoUserDataPdu {\n optional string qq = 1;\n optional string skype = 2;\n optional string mobile = 3;\n}\nmessage RCTabUpdateDataRequestPdu {\n optional uint32 id = 1;\n optional bytes action = 2;\n optional uint32 uncomprLen =3;\n}\n\nmessage RCWhiteBoardDataModel {\n required uint32 type= 1;//\u767D\u677F\u7C7B\u578B\n required uint32 itemIdx= 2;//itemIdx \u6BCF\u4E00\u6B21\u7ED8\u5236\u7684\u552F\u4E00\u6807\u8BC6\n required uint32 initiator=3; //\u7ED8\u5236\u6765\u81EA\u8C01\n required uint32 parentId=4; //\u7236\u7EA7\u7684id\n optional string pointGroup=5; //\u5750\u6807\u70B9\u96C6\u6570\u7EC4\u7684JSON\u5B57\u7B26\u4E32\n optional string color=6 [default = \"#000000\"]; //\u989C\u8272\n optional uint32 thickness= 7 ;//\u7EBF\u6761\u7C97\u7EC6\n optional uint32 radius= 8;//\u56ED\u7684\u534A\u5F84\n optional uint32 fontSize= 9;//\u5B57\u4F53\u5927\u5C0F\n optional string fontName= 10;//\u5B57\u4F53\u540D\u79F0\n optional string text= 11;//\u6587\u672C\u5185\u5BB9\n}\n\n\n//end\n";
13459 exports.default = _default; 13460 exports.default = _default;
13460 ; 13461 ;
13461 13462
@@ -15272,6 +15273,26 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15272,6 +15273,26 @@ return /******/ (function(modules) { // webpackBootstrap
15272 } 15273 }
15273 return true; 15274 return true;
15274 } 15275 }
  15276 + }, {
  15277 + key: "arrayToJsonString",
  15278 + value: function arrayToJsonString(_param) {
  15279 + try {
  15280 + return JSON.stringify(_param);
  15281 + } catch (err) {
  15282 + console.log("arrayToJsonString error:" + err.message);
  15283 + }
  15284 + return null;
  15285 + }
  15286 + }, {
  15287 + key: "arrayFromJsonString",
  15288 + value: function arrayFromJsonString(_param) {
  15289 + try {
  15290 + return JSON.parse(_param);
  15291 + } catch (err) {
  15292 + console.log("arrayFromJsonString error:" + err.message);
  15293 + }
  15294 + return null;
  15295 + }
15275 }]); 15296 }]);
15276 15297
15277 return EngineUtils; 15298 return EngineUtils;
@@ -15647,6 +15668,10 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15647,6 +15668,10 @@ return /******/ (function(modules) { // webpackBootstrap
15647 15668
15648 var _GlobalConfig2 = _interopRequireDefault(_GlobalConfig); 15669 var _GlobalConfig2 = _interopRequireDefault(_GlobalConfig);
15649 15670
  15671 + var _EngineUtils = __webpack_require__(36);
  15672 +
  15673 + var _EngineUtils2 = _interopRequireDefault(_EngineUtils);
  15674 +
15650 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 15675 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15651 15676
15652 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15677 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -15670,7 +15695,12 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15670,7 +15695,12 @@ return /******/ (function(modules) { // webpackBootstrap
15670 15695
15671 var loger = _Loger2.default.getLoger('WhiteBoardApe'); 15696 var loger = _Loger2.default.getLoger('WhiteBoardApe');
15672 15697
15673 - var insertIdx = 1; //table插入新数据的计数id 15698 + var itemIdx = 0; //table插入新数据的计数id,目前用时间戳
  15699 + var TYPE_BIGHT = 0; //任意线段
  15700 + var TYPE_LINE = 1; //直线
  15701 + var TYPE_RECT = 2; //矩形
  15702 + var TYPE_CIRCLE = 3; //圆形
  15703 + var TYPE_TEXT = 4; //文本
15674 15704
15675 var WhiteBoardApe = function (_Ape) { 15705 var WhiteBoardApe = function (_Ape) {
15676 _inherits(WhiteBoardApe, _Ape); 15706 _inherits(WhiteBoardApe, _Ape);
@@ -15707,40 +15737,43 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15707,40 +15737,43 @@ return /******/ (function(modules) { // webpackBootstrap
15707 }, { 15737 }, {
15708 key: 'sendInsetAnnotaion', 15738 key: 'sendInsetAnnotaion',
15709 value: function sendInsetAnnotaion(_param) { 15739 value: function sendInsetAnnotaion(_param) {
15710 - insertIdx = parseInt(Date.now() / 1000); 15740 + /* itemIdx=parseInt(Date.now()/1000);
  15741 + let whiteBoardModelPdu =new pdu['RCWhiteBoardDataModel'];
  15742 + whiteBoardModelPdu.id =itemIdx;
  15743 + whiteBoardModelPdu.initiator =GlobalConfig.nodeId;
  15744 + whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString([{"w":10,"h":20},{"w":10,"h":20},{"w":10,"h":20},{"w":10,"h":20}]);
  15745 + whiteBoardModelPdu.type = 3;
  15746 +
  15747 + */
  15748 +
  15749 + /* let whiteBoardModelPdu =new pdu['RCWhiteBoardDataModel'];
  15750 + whiteBoardModelPdu.id =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
  15751 + whiteBoardModelPdu.initiator =GlobalConfig.nodeId;
  15752 + whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString([{"w":133,"h":20},{"w":1313,"h":20},{"w":313,"h":20},{"w":10,"h":20}]);
  15753 + whiteBoardModelPdu.type = 3;
  15754 + */
  15755 +
  15756 + if (_param == null || _EngineUtils2.default.isEmptyObject(_param)) {
  15757 + loger.log('sendInsetAnnotaion失败,参数错误');
  15758 + this._emit(_MessageTypes2.default.MCU_ERROR, _MessageTypes2.default.ERR_APE_INTERFACE_PARAM_WRONG);
  15759 + return;
  15760 + }
  15761 +
  15762 + itemIdx = parseInt(Date.now() / 1000);
  15763 + var whiteBoardModelPdu = this.packPdu(_param, itemIdx);
  15764 + if (whiteBoardModelPdu == null) {
  15765 + loger.log('sendInsetAnnotaion失败,参数错误');
  15766 + this._emit(_MessageTypes2.default.MCU_ERROR, _MessageTypes2.default.ERR_APE_INTERFACE_PARAM_WRONG);
  15767 + return;
  15768 + }
  15769 + console.log(whiteBoardModelPdu);
15711 15770
15712 - var whiteBoardModelPdu = new _pdus2.default['RCWhiteBoardData']();  
15713 - whiteBoardModelPdu.id = insertIdx;  
15714 - whiteBoardModelPdu.initiator = _GlobalConfig2.default.nodeId;  
15715 - whiteBoardModelPdu.data = "白板数据 " + insertIdx;  
15716 - whiteBoardModelPdu.type = 3;  
15717 - //required uint32 id= 1;  
15718 - //required uint32 initiator=2;  
15719 - //optional string data= 3;  
15720 - //optional uint32 type= 4;  
15721 - //RCWhiteBoardData  
15722 -  
15723 - //com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int  
15724 - //public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void  
15725 - //registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO  
15726 - //tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID  
15727 - //tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID+insertIdx;  
15728 - //insertIdx++;  
15729 var tableItemPdu = new _pdus2.default['RCRegistryTableItemPdu'](); 15771 var tableItemPdu = new _pdus2.default['RCRegistryTableItemPdu']();
15730 - tableItemPdu.itemIdx = insertIdx; //直接用时间戳作为id 15772 + tableItemPdu.itemIdx = itemIdx; //直接用时间戳作为id
15731 tableItemPdu.registerObjId = _ApeConsts2.default.WHITEBOARD_OBJ_TABLE_ID; 15773 tableItemPdu.registerObjId = _ApeConsts2.default.WHITEBOARD_OBJ_TABLE_ID;
15732 tableItemPdu.owner = 0; //收到flash的是这个值,不清楚先写固定 15774 tableItemPdu.owner = 0; //收到flash的是这个值,不清楚先写固定
15733 - //tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();  
15734 tableItemPdu.itemData = whiteBoardModelPdu.toArrayBuffer(); 15775 tableItemPdu.itemData = whiteBoardModelPdu.toArrayBuffer();
15735 15776
15736 - //console.log("解析");  
15737 - //console.log(pdu['RCWhiteBoardData'].decode(tableItemPdu.itemData));  
15738 - /* message RCRegistryTableItemPdu {  
15739 - required uint32 item_idx = 1;  
15740 - required uint32 owner = 2;  
15741 - required bytes item_data = 3;  
15742 - }*/  
15743 -  
15744 //insert 15777 //insert
15745 var tableInsertItemPdu = new _pdus2.default['RCRegistryTableInsertItemPdu'](); 15778 var tableInsertItemPdu = new _pdus2.default['RCRegistryTableInsertItemPdu']();
15746 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU]; 15779 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
@@ -15782,7 +15815,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15782,7 +15815,7 @@ return /******/ (function(modules) { // webpackBootstrap
15782 }, { 15815 }, {
15783 key: 'sendDeleteAnnotaion', 15816 key: 'sendDeleteAnnotaion',
15784 value: function sendDeleteAnnotaion(_param) { 15817 value: function sendDeleteAnnotaion(_param) {
15785 - //delete 15818 + //{"itemIdx":itemIdx}
15786 var tableDeleteItemPdu = new _pdus2.default['RCRegistryTableDeleteItemPdu'](); 15819 var tableDeleteItemPdu = new _pdus2.default['RCRegistryTableDeleteItemPdu']();
15787 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU]; 15820 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];
15788 // repeated uint32 item_idx = 2; 15821 // repeated uint32 item_idx = 2;
@@ -15812,22 +15845,31 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15812,22 +15845,31 @@ return /******/ (function(modules) { // webpackBootstrap
15812 }, { 15845 }, {
15813 key: 'sendUpdaterAnnotaion', 15846 key: 'sendUpdaterAnnotaion',
15814 value: function sendUpdaterAnnotaion(_param) { 15847 value: function sendUpdaterAnnotaion(_param) {
15815 - var whiteBoardModelPdu = new _pdus2.default['RCWhiteBoardData']();  
15816 - whiteBoardModelPdu.id = _ApeConsts2.default.WHITEBOARD_OBJ_TABLE_ID;  
15817 - whiteBoardModelPdu.initiator = _GlobalConfig2.default.nodeId;  
15818 - whiteBoardModelPdu.data = "白板数据 " + insertIdx;  
15819 - whiteBoardModelPdu.type = 3; 15848 + if (_param == null || _EngineUtils2.default.isEmptyObject(_param)) {
  15849 + loger.log('sendUpdaterAnnotaion失败,参数错误');
  15850 + this._emit(_MessageTypes2.default.MCU_ERROR, _MessageTypes2.default.ERR_APE_INTERFACE_PARAM_WRONG);
  15851 + return;
  15852 + }
  15853 +
  15854 + /* let whiteBoardModelPdu =new pdu['RCWhiteBoardDataModel'];
  15855 + whiteBoardModelPdu.id =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
  15856 + whiteBoardModelPdu.initiator =GlobalConfig.nodeId;
  15857 + whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString([{"w":133,"h":20},{"w":1313,"h":20},{"w":313,"h":20},{"w":10,"h":20}]);
  15858 + whiteBoardModelPdu.type = 3;
  15859 + */
  15860 +
  15861 + itemIdx = _param.itemIdx;
  15862 + var whiteBoardModelPdu = this.packPdu(_param, itemIdx);
  15863 + console.log(whiteBoardModelPdu);
  15864 +
  15865 + if (whiteBoardModelPdu == null) {
  15866 + loger.log('sendInsetAnnotaion失败,参数错误');
  15867 + this._emit(_MessageTypes2.default.MCU_ERROR, _MessageTypes2.default.ERR_APE_INTERFACE_PARAM_WRONG);
  15868 + return;
  15869 + }
15820 15870
15821 var tableItemPdu = new _pdus2.default['RCRegistryTableItemPdu'](); 15871 var tableItemPdu = new _pdus2.default['RCRegistryTableItemPdu']();
15822 - /* tableItemPdu.itemIdx =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;  
15823 - tableItemPdu.owner = GlobalConfig.nodeId;  
15824 - tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();*/  
15825 -  
15826 - //com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int  
15827 - //public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void  
15828 - //registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO  
15829 - //tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID  
15830 - tableItemPdu.itemIdx = _ApeConsts2.default.WHITEBOARD_OBJ_TABLE_ID; 15872 + tableItemPdu.itemIdx = itemIdx;
15831 tableItemPdu.owner = 0; //收到flash的是这个值,不清楚先写固定 15873 tableItemPdu.owner = 0; //收到flash的是这个值,不清楚先写固定
15832 tableItemPdu.registerObjId = _ApeConsts2.default.WHITEBOARD_OBJ_TABLE_ID; 15874 tableItemPdu.registerObjId = _ApeConsts2.default.WHITEBOARD_OBJ_TABLE_ID;
15833 tableItemPdu.itemData = whiteBoardModelPdu.toArrayBuffer(); 15875 tableItemPdu.itemData = whiteBoardModelPdu.toArrayBuffer();
@@ -15857,36 +15899,109 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15857,36 +15899,109 @@ return /******/ (function(modules) { // webpackBootstrap
15857 this.sendUniform(adapterPdu, true); 15899 this.sendUniform(adapterPdu, true);
15858 } 15900 }
15859 15901
  15902 + ///////白板数据的封包和解包/////////////////////////////////////////
  15903 +
  15904 + }, {
  15905 + key: 'packPdu',
  15906 + value: function packPdu(_param, _itemIdx) {
  15907 + /* required uint32 type= 1;//白板类型
  15908 + required uint32 id= 2;//id 每一次绘制的唯一标识
  15909 + required uint32 initiator=3; //绘制来自谁
  15910 + optional string pointGroup=4; //坐标点集数组的JSON字符串
  15911 + optional string color= 5 [default = "#000000"]; //颜色
  15912 + optional uint32 thickness= 6 ;//线条粗细
  15913 + optional uint32 radius= 7;//园的半径
  15914 + optional uint32 fontSize= 8;//字体大小
  15915 + optional uint32 fontName= 9;//字体名称
  15916 + optional uint32 text= 10;//文本内容*/
  15917 +
  15918 + //验证坐标点集合数组是否合法
  15919 + if (_param.pointGroup == null || _param.pointGroup.length < 1) {
  15920 + this._emit(_MessageTypes2.default.MCU_ERROR, _MessageTypes2.default.ERR_APE_INTERFACE_PARAM_WRONG);
  15921 + return null;
  15922 + }
  15923 + //判断type类型,根据type设置不同的参数
  15924 + var whiteBoardModelPdu = new _pdus2.default['RCWhiteBoardDataModel']();
  15925 + switch (_param.type) {
  15926 + case TYPE_BIGHT:
  15927 + break;
  15928 + case TYPE_LINE:
  15929 + break;
  15930 + case TYPE_RECT:
  15931 + break;
  15932 + case TYPE_CIRCLE:
  15933 + whiteBoardModelPdu.radius = parseInt(_param.radius);
  15934 + break;
  15935 + case TYPE_TEXT:
  15936 + whiteBoardModelPdu.fontSize = parseInt(_param.fontSize);
  15937 + whiteBoardModelPdu.fontName = _param.fontName || null;
  15938 + whiteBoardModelPdu.text = _param.text || null;
  15939 + break;
  15940 + default:
  15941 + //其它类型不做处理
  15942 + return null;
  15943 + break;
  15944 + }
  15945 + //下面4个是必须的参数
  15946 + whiteBoardModelPdu.type = _param.type;
  15947 + whiteBoardModelPdu.itemIdx = _itemIdx;
  15948 + whiteBoardModelPdu.initiator = _GlobalConfig2.default.nodeId;
  15949 + whiteBoardModelPdu.parentId = _ApeConsts2.default.WHITEBOARD_OBJ_TABLE_ID;
  15950 +
  15951 + whiteBoardModelPdu.pointGroup = _EngineUtils2.default.arrayToJsonString(_param.pointGroup);
  15952 + whiteBoardModelPdu.color = _param.color || "#000000";
  15953 +
  15954 + return whiteBoardModelPdu;
  15955 + }
  15956 + }, {
  15957 + key: 'unPackPdu',
  15958 + value: function unPackPdu(owner, itemIdx, itemData) {
  15959 + try {
  15960 + console.log("白板收到数据===tableUpdateHandler ");
  15961 + var whiteBoardModelPdu = _pdus2.default['RCWhiteBoardDataModel'].decode(itemData);
  15962 + this.annoInfos[itemIdx] = itemData;
  15963 + console.log(whiteBoardModelPdu);
  15964 + loger.log(whiteBoardModelPdu);
  15965 + return whiteBoardModelPdu;
  15966 + } catch (err) {
  15967 + console.log("tableUpdateHandler Pdu解析错误,itemIdx=" + itemIdx + " err:" + err.message);
  15968 + }
  15969 + return null;
  15970 + }
  15971 +
15860 /////收到消息处理///////////////////////////////////////////////////////////////////////////////// 15972 /////收到消息处理/////////////////////////////////////////////////////////////////////////////////
15861 15973
15862 }, { 15974 }, {
15863 key: 'whiteboardMsgComingHandler', 15975 key: 'whiteboardMsgComingHandler',
15864 value: function whiteboardMsgComingHandler(pdu) { 15976 value: function whiteboardMsgComingHandler(pdu) {
15865 - //loger.warn('whiteboardMsgComingHandler needs to be handled.');  
15866 - console.log("白板收到数据=============================RCPDU_CONFERENCE_SEND_DATA_REQUEST"); 15977 + loger.warn('whiteboardMsgComingHandler needs to be handled.');
15867 } 15978 }
15868 }, { 15979 }, {
15869 key: 'tableInsertHandler', 15980 key: 'tableInsertHandler',
15870 value: function tableInsertHandler(owner, itemIdx, itemData) { 15981 value: function tableInsertHandler(owner, itemIdx, itemData) {
15871 - this.annoInfos[itemIdx] = itemData;  
15872 - console.log("白板收到数据==========tableInsertHandler");  
15873 - var nodeData = _pdus2.default['RCWhiteBoardData'].decode(itemData);  
15874 - console.log("白板收到数据==========tableInsertHandler" + nodeData);  
15875 - console.log(nodeData);  
15876 - //this.emitDocChange(ApeConsts.DOCUMENT_DEL); 15982 + /* try{
  15983 + console.log("白板收到数据===tableInsertHandler ");
  15984 + let whiteBoardModelPdu= pdu['RCWhiteBoardDataModel'].decode(itemData);
  15985 + this.annoInfos[itemIdx] = itemData;
  15986 + console.log(whiteBoardModelPdu);
  15987 + }catch (err){
  15988 + console.log("tableInsertHandler Pdu解析错误,itemIdx="+itemIdx+" err:"+err.message);
  15989 + }*/
  15990 + var whiteBoardModel = this.unPackPdu(owner, itemIdx, itemData);
15877 } 15991 }
15878 }, { 15992 }, {
15879 key: 'tableUpdateHandler', 15993 key: 'tableUpdateHandler',
15880 value: function tableUpdateHandler(owner, itemIdx, itemData) { 15994 value: function tableUpdateHandler(owner, itemIdx, itemData) {
15881 - this.annoInfos[itemIdx] = itemData;  
15882 - console.log("白板收到数据===tableUpdateHandler itemData=" + itemData);  
15883 - try {  
15884 - console.log("白板收到数据===tableUpdateHandler ");  
15885 - var whiteBoardModelPdu = _pdus2.default['RCWhiteBoardData'].decode(itemData);  
15886 - console.log(whiteBoardModelPdu);  
15887 - } catch (err) {  
15888 - console.log("tableUpdateHandler Pdu解析错误,itemIdx=" + itemIdx + " err:" + err.message);  
15889 - } 15995 + var whiteBoardModel = this.unPackPdu(owner, itemIdx, itemData);
  15996 + /* try{
  15997 + console.log("白板收到数据===tableUpdateHandler ");
  15998 + let whiteBoardModelPdu= pdu['RCWhiteBoardDataModel'].decode(itemData);
  15999 + this.annoInfos[itemIdx] = itemData;
  16000 + console.log(whiteBoardModelPdu);
  16001 + loger.log(whiteBoardModelPdu)
  16002 + }catch (err){
  16003 + console.log("tableUpdateHandler Pdu解析错误,itemIdx="+itemIdx+" err:"+err.message);
  16004 + }*/
15890 16005
15891 /*const recordInfo = pdu['RCWhiteboardDataRequestPdu'].decode(recordData); 16006 /*const recordInfo = pdu['RCWhiteboardDataRequestPdu'].decode(recordData);
15892 console.log("recordInfo"); 16007 console.log("recordInfo");
@@ -15908,7 +16023,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15908,7 +16023,7 @@ return /******/ (function(modules) { // webpackBootstrap
15908 }, { 16023 }, {
15909 key: 'tableDeleteHandler', 16024 key: 'tableDeleteHandler',
15910 value: function tableDeleteHandler(object_id, tableDeleteData) { 16025 value: function tableDeleteHandler(object_id, tableDeleteData) {
15911 - console.log("白板收到数据=============================tableDeleteHandler"); 16026 + console.log("白板收到数据,tableDeleteHandler object_id=" + object_id);
15912 } 16027 }
15913 }]); 16028 }]);
15914 16029
@@ -15926,7 +16041,17 @@ return /******/ (function(modules) { // webpackBootstrap @@ -15926,7 +16041,17 @@ return /******/ (function(modules) { // webpackBootstrap
15926 16041
15927 __REACT_HOT_LOADER__.register(loger, 'loger', 'D:/work/McuClient/src/apes/WhiteBoardApe.js'); 16042 __REACT_HOT_LOADER__.register(loger, 'loger', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
15928 16043
15929 - __REACT_HOT_LOADER__.register(insertIdx, 'insertIdx', 'D:/work/McuClient/src/apes/WhiteBoardApe.js'); 16044 + __REACT_HOT_LOADER__.register(itemIdx, 'itemIdx', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
  16045 +
  16046 + __REACT_HOT_LOADER__.register(TYPE_BIGHT, 'TYPE_BIGHT', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
  16047 +
  16048 + __REACT_HOT_LOADER__.register(TYPE_LINE, 'TYPE_LINE', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
  16049 +
  16050 + __REACT_HOT_LOADER__.register(TYPE_RECT, 'TYPE_RECT', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
  16051 +
  16052 + __REACT_HOT_LOADER__.register(TYPE_CIRCLE, 'TYPE_CIRCLE', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
  16053 +
  16054 + __REACT_HOT_LOADER__.register(TYPE_TEXT, 'TYPE_TEXT', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
15930 16055
15931 __REACT_HOT_LOADER__.register(WhiteBoardApe, 'WhiteBoardApe', 'D:/work/McuClient/src/apes/WhiteBoardApe.js'); 16056 __REACT_HOT_LOADER__.register(WhiteBoardApe, 'WhiteBoardApe', 'D:/work/McuClient/src/apes/WhiteBoardApe.js');
15932 16057
@@ -9,5 +9,21 @@ class EngineUtils{ @@ -9,5 +9,21 @@ class EngineUtils{
9 } 9 }
10 return true; 10 return true;
11 } 11 }
  12 + static arrayToJsonString(_param){
  13 + try{
  14 + return JSON.stringify(_param);
  15 + }catch (err){
  16 + console.log("arrayToJsonString error:"+err.message);
  17 + }
  18 + return null;
  19 + }
  20 + static arrayFromJsonString(_param){
  21 + try{
  22 + return JSON.parse(_param);
  23 + }catch (err){
  24 + console.log("arrayFromJsonString error:"+err.message);
  25 + }
  26 + return null;
  27 + }
12 } 28 }
13 export default EngineUtils; 29 export default EngineUtils;
@@ -87,6 +87,7 @@ MessageTypes.ERR_GET_MEETING_PARAML=301;//获取MeetingParam失败 @@ -87,6 +87,7 @@ MessageTypes.ERR_GET_MEETING_PARAML=301;//获取MeetingParam失败
87 87
88 //APE 88 //APE
89 MessageTypes.ERR_APE_SEND_FAILED_NO_JOIN=500;//APE在sdk为初始化或未加入会议之前调用发送数据接口 89 MessageTypes.ERR_APE_SEND_FAILED_NO_JOIN=500;//APE在sdk为初始化或未加入会议之前调用发送数据接口
  90 +MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG=501;//APE在接口调用时参数错误
90 91
91 export default MessageTypes; 92 export default MessageTypes;
92 93
@@ -21,10 +21,17 @@ import MessageTypes from 'MessageTypes'; @@ -21,10 +21,17 @@ import MessageTypes from 'MessageTypes';
21 import { Zlib } from 'zlibjs/bin/zlib.min'; 21 import { Zlib } from 'zlibjs/bin/zlib.min';
22 import UTF8 from 'utf-8'; 22 import UTF8 from 'utf-8';
23 import GlobalConfig from 'GlobalConfig'; 23 import GlobalConfig from 'GlobalConfig';
  24 +import EngineUtils from 'EngineUtils';
24 25
25 let loger = Loger.getLoger('WhiteBoardApe'); 26 let loger = Loger.getLoger('WhiteBoardApe');
26 27
27 -let insertIdx=1;//table插入新数据的计数id 28 +let itemIdx=0;//table插入新数据的计数id,目前用时间戳
  29 +const TYPE_BIGHT=0;//任意线段
  30 +const TYPE_LINE=1;//直线
  31 +const TYPE_RECT=2;//矩形
  32 +const TYPE_CIRCLE=3;//圆形
  33 +const TYPE_TEXT=4;//文本
  34 +
28 class WhiteBoardApe extends Ape { 35 class WhiteBoardApe extends Ape {
29 constructor() { 36 constructor() {
30 super( 37 super(
@@ -54,40 +61,43 @@ class WhiteBoardApe extends Ape { @@ -54,40 +61,43 @@ class WhiteBoardApe extends Ape {
54 /////////////发送数据操作////////////////////////////////////////////////////// 61 /////////////发送数据操作//////////////////////////////////////////////////////
55 // 添加标注,发送信息 62 // 添加标注,发送信息
56 sendInsetAnnotaion(_param){ 63 sendInsetAnnotaion(_param){
57 - insertIdx=parseInt(Date.now()/1000);  
58 -  
59 - let whiteBoardModelPdu =new pdu['RCWhiteBoardData'];  
60 - whiteBoardModelPdu.id =insertIdx; 64 +/* itemIdx=parseInt(Date.now()/1000);
  65 + let whiteBoardModelPdu =new pdu['RCWhiteBoardDataModel'];
  66 + whiteBoardModelPdu.id =itemIdx;
61 whiteBoardModelPdu.initiator =GlobalConfig.nodeId; 67 whiteBoardModelPdu.initiator =GlobalConfig.nodeId;
62 - whiteBoardModelPdu.data ="白板数据 "+insertIdx; 68 + whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString([{"w":10,"h":20},{"w":10,"h":20},{"w":10,"h":20},{"w":10,"h":20}]);
63 whiteBoardModelPdu.type = 3; 69 whiteBoardModelPdu.type = 3;
64 - //required uint32 id= 1;  
65 - //required uint32 initiator=2;  
66 - //optional string data= 3;  
67 - //optional uint32 type= 4;  
68 - //RCWhiteBoardData  
69 -  
70 - //com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int  
71 - //public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void  
72 - //registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO  
73 - //tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID  
74 - //tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID+insertIdx;  
75 - //insertIdx++;  
76 - let tableItemPdu = new pdu['RCRegistryTableItemPdu'];  
77 - tableItemPdu.itemIdx=insertIdx;//直接用时间戳作为id 70 +
  71 + */
  72 +
  73 + /* let whiteBoardModelPdu =new pdu['RCWhiteBoardDataModel'];
  74 + whiteBoardModelPdu.id =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
  75 + whiteBoardModelPdu.initiator =GlobalConfig.nodeId;
  76 + whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString([{"w":133,"h":20},{"w":1313,"h":20},{"w":313,"h":20},{"w":10,"h":20}]);
  77 + whiteBoardModelPdu.type = 3;
  78 + */
  79 +
  80 + if(_param==null||EngineUtils.isEmptyObject(_param)){
  81 + loger.log('sendInsetAnnotaion失败,参数错误');
  82 + this._emit(MessageTypes.MCU_ERROR,MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG);
  83 + return ;
  84 + }
  85 +
  86 + itemIdx=parseInt(Date.now()/1000);
  87 + let whiteBoardModelPdu = this.packPdu(_param,itemIdx);
  88 + if(whiteBoardModelPdu==null){
  89 + loger.log('sendInsetAnnotaion失败,参数错误');
  90 + this._emit(MessageTypes.MCU_ERROR,MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG);
  91 + return ;
  92 + }
  93 + console.log(whiteBoardModelPdu);
  94 +
  95 + let tableItemPdu = new pdu['RCRegistryTableItemPdu'];
  96 + tableItemPdu.itemIdx=itemIdx;//直接用时间戳作为id
78 tableItemPdu.registerObjId=ApeConsts.WHITEBOARD_OBJ_TABLE_ID; 97 tableItemPdu.registerObjId=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
79 tableItemPdu.owner = 0;//收到flash的是这个值,不清楚先写固定 98 tableItemPdu.owner = 0;//收到flash的是这个值,不清楚先写固定
80 - //tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();  
81 tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer(); 99 tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();
82 100
83 - //console.log("解析");  
84 - //console.log(pdu['RCWhiteBoardData'].decode(tableItemPdu.itemData));  
85 -/* message RCRegistryTableItemPdu {  
86 - required uint32 item_idx = 1;  
87 - required uint32 owner = 2;  
88 - required bytes item_data = 3;  
89 - }*/  
90 -  
91 //insert 101 //insert
92 let tableInsertItemPdu = new pdu['RCRegistryTableInsertItemPdu']; 102 let tableInsertItemPdu = new pdu['RCRegistryTableInsertItemPdu'];
93 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU]; 103 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
@@ -123,7 +133,7 @@ class WhiteBoardApe extends Ape { @@ -123,7 +133,7 @@ class WhiteBoardApe extends Ape {
123 } 133 }
124 //删除标注,发送信息 134 //删除标注,发送信息
125 sendDeleteAnnotaion(_param){ 135 sendDeleteAnnotaion(_param){
126 - //delete 136 + //{"itemIdx":itemIdx}
127 let tableDeleteItemPdu = new pdu['RCRegistryTableDeleteItemPdu']; 137 let tableDeleteItemPdu = new pdu['RCRegistryTableDeleteItemPdu'];
128 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU]; 138 //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_DELETE_PDU];
129 // repeated uint32 item_idx = 2; 139 // repeated uint32 item_idx = 2;
@@ -151,80 +161,155 @@ class WhiteBoardApe extends Ape { @@ -151,80 +161,155 @@ class WhiteBoardApe extends Ape {
151 161
152 //更新标注 162 //更新标注
153 sendUpdaterAnnotaion(_param){ 163 sendUpdaterAnnotaion(_param){
154 - let whiteBoardModelPdu =new pdu['RCWhiteBoardData'];  
155 - whiteBoardModelPdu.id =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;  
156 - whiteBoardModelPdu.initiator =GlobalConfig.nodeId;  
157 - whiteBoardModelPdu.data ="白板数据 "+insertIdx;  
158 - whiteBoardModelPdu.type = 3; 164 + if(_param==null||EngineUtils.isEmptyObject(_param)){
  165 + loger.log('sendUpdaterAnnotaion失败,参数错误');
  166 + this._emit(MessageTypes.MCU_ERROR,MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG);
  167 + return ;
  168 + }
  169 +
  170 + /* let whiteBoardModelPdu =new pdu['RCWhiteBoardDataModel'];
  171 + whiteBoardModelPdu.id =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
  172 + whiteBoardModelPdu.initiator =GlobalConfig.nodeId;
  173 + whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString([{"w":133,"h":20},{"w":1313,"h":20},{"w":313,"h":20},{"w":10,"h":20}]);
  174 + whiteBoardModelPdu.type = 3;
  175 + */
  176 +
  177 + itemIdx=_param.itemIdx;
  178 + let whiteBoardModelPdu = this.packPdu(_param,itemIdx);
  179 + console.log(whiteBoardModelPdu);
159 180
160 - let tableItemPdu = new pdu['RCRegistryTableItemPdu'];  
161 - /* tableItemPdu.itemIdx =ApeConsts.WHITEBOARD_OBJ_TABLE_ID;  
162 - tableItemPdu.owner = GlobalConfig.nodeId;  
163 - tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();*/ 181 + if(whiteBoardModelPdu==null){
  182 + loger.log('sendInsetAnnotaion失败,参数错误');
  183 + this._emit(MessageTypes.MCU_ERROR,MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG);
  184 + return ;
  185 + }
164 186
165 - //com.seemq.wrcp.RCApe._update_table_item(obj_id:int, idx:int, item_data:ByteArray, has_owner:Boolean=true):int  
166 - //public function add_item(idx:int, owner:int = 0, item_data:ByteArray = null):void  
167 - //registry_table_operator.add_item(((RCConst_E.VIDEO_SESSION_ID << 16) + i), 0, channel_data); VIDEO  
168 - //tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;//收到flash的是999这个值,不清楚先写固定WHITEBOARD_OBJ_TABLE_ID  
169 - tableItemPdu.itemIdx=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;  
170 - tableItemPdu.owner = 0;//收到flash的是这个值,不清楚先写固定  
171 - tableItemPdu.registerObjId=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;  
172 - tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer(); 187 + let tableItemPdu = new pdu['RCRegistryTableItemPdu'];
  188 + tableItemPdu.itemIdx=itemIdx;
  189 + tableItemPdu.owner = 0;//收到flash的是这个值,不清楚先写固定
  190 + tableItemPdu.registerObjId=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
  191 + tableItemPdu.itemData =whiteBoardModelPdu.toArrayBuffer();
173 192
174 193
175 - //updater  
176 - let whiteBoardUpdateItem = new pdu['RCRegistryTableUpdateItemPdu'];  
177 - //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];  
178 - //repeated RCRegistryTableItemPdu items = 2;  
179 - whiteBoardUpdateItem.type = pdu.RCPDU_REG_TABLE_UPDATE_PDU;//  
180 - whiteBoardUpdateItem.items.push(tableItemPdu); 194 + //updater
  195 + let whiteBoardUpdateItem = new pdu['RCRegistryTableUpdateItemPdu'];
  196 + //optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];
  197 + //repeated RCRegistryTableItemPdu items = 2;
  198 + whiteBoardUpdateItem.type = pdu.RCPDU_REG_TABLE_UPDATE_PDU;//
  199 + whiteBoardUpdateItem.items.push(tableItemPdu);
181 200
182 201
183 - let updateObjPdu = new pdu['RCRegistryUpdateObjPdu'];  
184 - updateObjPdu.objId = ApeConsts.WHITEBOARD_OBJ_TABLE_ID;  
185 - updateObjPdu.subType = whiteBoardUpdateItem.type;  
186 - updateObjPdu.userData = whiteBoardUpdateItem.toArrayBuffer(); 202 + let updateObjPdu = new pdu['RCRegistryUpdateObjPdu'];
  203 + updateObjPdu.objId = ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
  204 + updateObjPdu.subType = whiteBoardUpdateItem.type;
  205 + updateObjPdu.userData = whiteBoardUpdateItem.toArrayBuffer();
187 206
188 - //同步  
189 - let adapterItemPdu = new pdu['RCAdapterItemPdu'];  
190 - adapterItemPdu.type = pdu.RCPDU_REG_UPDATE_OBJ;  
191 - adapterItemPdu.itemData = updateObjPdu.toArrayBuffer(); 207 + //同步
  208 + let adapterItemPdu = new pdu['RCAdapterItemPdu'];
  209 + adapterItemPdu.type = pdu.RCPDU_REG_UPDATE_OBJ;
  210 + adapterItemPdu.itemData = updateObjPdu.toArrayBuffer();
192 211
193 - let adapterPdu = new pdu['RCAdapterPdu'];  
194 - adapterPdu.type = pdu.RCPDU_REG_ADAPTER;  
195 - adapterPdu.item.push(adapterItemPdu); 212 + let adapterPdu = new pdu['RCAdapterPdu'];
  213 + adapterPdu.type = pdu.RCPDU_REG_ADAPTER;
  214 + adapterPdu.item.push(adapterItemPdu);
196 215
197 - console.log("白板发送更新数据===============22");  
198 - this.sendUniform(adapterPdu,true); 216 + console.log("白板发送更新数据===============22");
  217 + this.sendUniform(adapterPdu,true);
199 } 218 }
200 219
  220 + ///////白板数据的封包和解包/////////////////////////////////////////
  221 + packPdu(_param,_itemIdx){
  222 + /* required uint32 type= 1;//白板类型
  223 + required uint32 id= 2;//id 每一次绘制的唯一标识
  224 + required uint32 initiator=3; //绘制来自谁
  225 + optional string pointGroup=4; //坐标点集数组的JSON字符串
  226 + optional string color= 5 [default = "#000000"]; //颜色
  227 + optional uint32 thickness= 6 ;//线条粗细
  228 + optional uint32 radius= 7;//园的半径
  229 + optional uint32 fontSize= 8;//字体大小
  230 + optional uint32 fontName= 9;//字体名称
  231 + optional uint32 text= 10;//文本内容*/
  232 +
  233 + //验证坐标点集合数组是否合法
  234 + if(_param.pointGroup==null||_param.pointGroup.length<1){
  235 + this._emit(MessageTypes.MCU_ERROR,MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG);
  236 + return null;
  237 + }
  238 + //判断type类型,根据type设置不同的参数
  239 + let whiteBoardModelPdu =new pdu['RCWhiteBoardDataModel'];
  240 + switch (_param.type){
  241 + case TYPE_BIGHT:
  242 + break;
  243 + case TYPE_LINE:
  244 + break;
  245 + case TYPE_RECT:
  246 + break;
  247 + case TYPE_CIRCLE:
  248 + whiteBoardModelPdu.radius=parseInt(_param.radius);
  249 + break;
  250 + case TYPE_TEXT:
  251 + whiteBoardModelPdu.fontSize=parseInt(_param.fontSize);
  252 + whiteBoardModelPdu.fontName=_param.fontName||null;
  253 + whiteBoardModelPdu.text=_param.text||null;
  254 + break;
  255 + default:
  256 + //其它类型不做处理
  257 + return null;
  258 + break;
  259 + }
  260 + //下面4个是必须的参数
  261 + whiteBoardModelPdu.type =_param.type;
  262 + whiteBoardModelPdu.itemIdx =_itemIdx;
  263 + whiteBoardModelPdu.initiator =GlobalConfig.nodeId;
  264 + whiteBoardModelPdu.parentId=ApeConsts.WHITEBOARD_OBJ_TABLE_ID;
  265 +
  266 + whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString(_param.pointGroup);
  267 + whiteBoardModelPdu.color=_param.color||"#000000";
  268 +
  269 + return whiteBoardModelPdu;
  270 + }
  271 + unPackPdu(owner, itemIdx,itemData){
  272 + try{
  273 + console.log("白板收到数据===tableUpdateHandler ");
  274 + let whiteBoardModelPdu= pdu['RCWhiteBoardDataModel'].decode(itemData);
  275 + this.annoInfos[itemIdx] = itemData;
  276 + console.log(whiteBoardModelPdu);
  277 + loger.log(whiteBoardModelPdu);
  278 + return whiteBoardModelPdu;
  279 + }catch (err){
  280 + console.log("tableUpdateHandler Pdu解析错误,itemIdx="+itemIdx+" err:"+err.message);
  281 + }
  282 + return null;
  283 + }
201 284
202 /////收到消息处理///////////////////////////////////////////////////////////////////////////////// 285 /////收到消息处理/////////////////////////////////////////////////////////////////////////////////
203 -  
204 whiteboardMsgComingHandler(pdu) { 286 whiteboardMsgComingHandler(pdu) {
205 - //loger.warn('whiteboardMsgComingHandler needs to be handled.');  
206 - console.log("白板收到数据=============================RCPDU_CONFERENCE_SEND_DATA_REQUEST"); 287 + loger.warn('whiteboardMsgComingHandler needs to be handled.');
207 } 288 }
208 289
209 tableInsertHandler(owner, itemIdx,itemData) { 290 tableInsertHandler(owner, itemIdx,itemData) {
210 - this.annoInfos[itemIdx] = itemData;  
211 - console.log("白板收到数据==========tableInsertHandler");  
212 - let nodeData = pdu['RCWhiteBoardData'].decode(itemData);  
213 - console.log("白板收到数据==========tableInsertHandler"+nodeData);  
214 - console.log(nodeData);  
215 - //this.emitDocChange(ApeConsts.DOCUMENT_DEL); 291 + /* try{
  292 + console.log("白板收到数据===tableInsertHandler ");
  293 + let whiteBoardModelPdu= pdu['RCWhiteBoardDataModel'].decode(itemData);
  294 + this.annoInfos[itemIdx] = itemData;
  295 + console.log(whiteBoardModelPdu);
  296 + }catch (err){
  297 + console.log("tableInsertHandler Pdu解析错误,itemIdx="+itemIdx+" err:"+err.message);
  298 + }*/
  299 + let whiteBoardModel=this.unPackPdu(owner, itemIdx,itemData);
216 } 300 }
217 301
218 tableUpdateHandler(owner, itemIdx, itemData) { 302 tableUpdateHandler(owner, itemIdx, itemData) {
219 - this.annoInfos[itemIdx] = itemData;  
220 - console.log("白板收到数据===tableUpdateHandler itemData="+itemData);  
221 - try{ 303 + let whiteBoardModel=this.unPackPdu(owner, itemIdx,itemData);
  304 + /* try{
222 console.log("白板收到数据===tableUpdateHandler "); 305 console.log("白板收到数据===tableUpdateHandler ");
223 - let whiteBoardModelPdu= pdu['RCWhiteBoardData'].decode(itemData); 306 + let whiteBoardModelPdu= pdu['RCWhiteBoardDataModel'].decode(itemData);
  307 + this.annoInfos[itemIdx] = itemData;
224 console.log(whiteBoardModelPdu); 308 console.log(whiteBoardModelPdu);
  309 + loger.log(whiteBoardModelPdu)
225 }catch (err){ 310 }catch (err){
226 console.log("tableUpdateHandler Pdu解析错误,itemIdx="+itemIdx+" err:"+err.message); 311 console.log("tableUpdateHandler Pdu解析错误,itemIdx="+itemIdx+" err:"+err.message);
227 - } 312 + }*/
228 313
229 /*const recordInfo = pdu['RCWhiteboardDataRequestPdu'].decode(recordData); 314 /*const recordInfo = pdu['RCWhiteboardDataRequestPdu'].decode(recordData);
230 console.log("recordInfo"); 315 console.log("recordInfo");
@@ -245,7 +330,7 @@ class WhiteBoardApe extends Ape { @@ -245,7 +330,7 @@ class WhiteBoardApe extends Ape {
245 }*/ 330 }*/
246 } 331 }
247 tableDeleteHandler(object_id, tableDeleteData){ 332 tableDeleteHandler(object_id, tableDeleteData){
248 - console.log("白板收到数据=============================tableDeleteHandler"); 333 + console.log("白板收到数据,tableDeleteHandler object_id="+object_id);
249 } 334 }
250 } 335 }
251 336
@@ -151,7 +151,7 @@ class MCU extends Emiter { @@ -151,7 +151,7 @@ class MCU extends Emiter {
151 // this._apes[ape].stop(); 151 // this._apes[ape].stop();
152 // } 152 // }
153 loger.log('leaveMCU'); 153 loger.log('leaveMCU');
154 - GlobalConfig.setCurrentStatus(GlobalConfig.statusCode_3) 154 + GlobalConfig.setCurrentStatus(GlobalConfig.statusCode_3);
155 this._everSocket.end(); 155 this._everSocket.end();
156 } 156 }
157 157
@@ -290,10 +290,6 @@ message RCRegistryRosterUpdateItemPdu { @@ -290,10 +290,6 @@ message RCRegistryRosterUpdateItemPdu {
290 repeated RCRegistryRosterItemPdu items = 2; 290 repeated RCRegistryRosterItemPdu items = 2;
291 } 291 }
292 292
293 -message RCRegistryWBUpdateItemPdu {  
294 - optional RCPduType_E type = 1 [default = RCPDU_REG_TABLE_UPDATE_PDU];  
295 - repeated RCWhiteboardDataRequestPdu items = 2;  
296 -}  
297 //message RCCleanupNodePdu 293 //message RCCleanupNodePdu
298 //{ 294 //{
299 // optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE]; 295 // optional RCPduType_E type = 1 [default = RCPDU_REG_CLEANUP_NODE];
@@ -842,20 +838,20 @@ message RCTabUpdateDataRequestPdu { @@ -842,20 +838,20 @@ message RCTabUpdateDataRequestPdu {
842 optional uint32 uncomprLen =3; 838 optional uint32 uncomprLen =3;
843 } 839 }
844 840
845 -message RCWhiteboardDataRequestPdu {  
846 - required uint32 id = 1;  
847 - required uint32 type = 2;  
848 - required uint32 initiator = 3;  
849 - optional bytes action = 4;  
850 - optional uint32 uncomprLen = 5; 841 +message RCWhiteBoardDataModel {
  842 + required uint32 type= 1;//白板类型
  843 + required uint32 itemIdx= 2;//itemIdx 每一次绘制的唯一标识
  844 + required uint32 initiator=3; //绘制来自谁
  845 + required uint32 parentId=4; //父级的id
  846 + optional string pointGroup=5; //坐标点集数组的JSON字符串
  847 + optional string color=6 [default = "#000000"]; //颜色
  848 + optional uint32 thickness= 7 ;//线条粗细
  849 + optional uint32 radius= 8;//园的半径
  850 + optional uint32 fontSize= 9;//字体大小
  851 + optional string fontName= 10;//字体名称
  852 + optional string text= 11;//文本内容
851 } 853 }
852 854
853 -message RCWhiteBoardData {  
854 - required uint32 id= 1;  
855 - required uint32 initiator=2;  
856 - optional string data= 3;  
857 - optional uint32 type= 4;  
858 -}  
859 855
860 //end 856 //end
861 `; 857 `;