|
@@ -13,10 +13,8 @@
|
|
|
#include"ant.h"
|
|
|
#include"websocket/constdef.h"
|
|
|
#include"websocket/wsClientMgr.h"
|
|
|
-
|
|
|
+#include "crc.h"
|
|
|
#include"mine.h"
|
|
|
-
|
|
|
-
|
|
|
uint64_t module_call::call_card::to_id64()
|
|
|
{
|
|
|
return tool_other::type_id_to_u64(cardtype, cardid);
|
|
@@ -92,6 +90,9 @@ void module_call::send_to_sites(call_site_map& site_map)
|
|
|
|
|
|
std::vector<char> arr;
|
|
|
|
|
|
+ int16_t cmd = 0x77ab;
|
|
|
+ arr.push_back(cmd>>8);
|
|
|
+ arr.push_back(cmd);
|
|
|
//分站地址 4字节,支持大小分站呼叫协议;added by zhuyf 2018/06/04
|
|
|
//大小分站的全员呼叫,分站id要求4字节全为FF
|
|
|
uint32_t anchor_id = (iter_site->second->is_call_all()? 0xffffffff : static_cast<uint32_t>(iter_site->first));
|
|
@@ -127,10 +128,17 @@ void module_call::send_to_sites(call_site_map& site_map)
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- //std::vector<char> arr2 = arr;
|
|
|
+ int16_t len=arr.size()+2;
|
|
|
+ int16_t crc=do_crc_1(arr,0);
|
|
|
+
|
|
|
+ auto it= arr.begin();arr.insert(it,len);
|
|
|
+ it= arr.begin();arr.insert(it,len>>8);
|
|
|
+
|
|
|
+ arr.push_back(crc>>8);arr.push_back(crc);
|
|
|
+ std::vector<char> arr2 = arr;
|
|
|
sit_ptr->m_clt->send(std::move(arr));
|
|
|
|
|
|
- //print_test(std::move(arr2), iter_site->first);
|
|
|
+ print_test(std::move(arr2), iter_site->first);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -173,7 +181,7 @@ web发给采集:发起呼叫
|
|
|
*/
|
|
|
void module_call::accept_call(sio::message::ptr const& data)
|
|
|
{
|
|
|
- int call_type = -1, call_level = -1, call_time_interval=-1;
|
|
|
+ int call_type = -1, call_level = 1, call_time_interval=-1;
|
|
|
uint32_t call_time_out = 0;
|
|
|
std::string user_name;
|
|
|
|
|
@@ -656,7 +664,7 @@ void module_call::get_user_all_call_cards(call_user_ptr& user_ptr,
|
|
|
*/
|
|
|
void module_call::system_call_apoint(int card_id,int card_type)
|
|
|
{
|
|
|
- int call_type = -1, call_level = -1, call_time_interval=-1;
|
|
|
+ int call_type = -1, call_level = 1, call_time_interval=-1;
|
|
|
uint32_t call_time_out = 0;
|
|
|
std::string user_name = "system_apoint";
|
|
|
|