MCPcopy Create free account
hub / github.com/F-Stack/f-stack / DoEncode

Method DoEncode

adapter/micro_thread/mt_action.cpp:136–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136int IMtAction::DoEncode()
137{
138 MtMsgBuf* msg_buff = NULL;
139 if (_conn) {
140 msg_buff = _conn->GetMtMsgBuff();
141 }
142 if (!_conn || !msg_buff) {
143 MTLOG_ERROR("conn(%p) or msgbuff(%p) null", _conn, msg_buff);
144 return -100;
145 }
146
147 int msg_len = msg_buff->GetMaxLen();
148 int ret = this->HandleEncode(msg_buff->GetMsgBuff(), msg_len, _msg);
149 if (ret < 0)
150 {
151 MTLOG_DEBUG("handleecode failed, ret %d", ret);
152 return ret;
153 }
154 msg_buff->SetMsgLen(msg_len);
155
156 return 0;
157}
158
159int IMtAction::DoInput()
160{

Callers 1

mt_msg_sendrcvMethod · 0.80

Calls 5

HandleEncodeMethod · 0.95
GetMtMsgBuffMethod · 0.80
GetMaxLenMethod · 0.80
GetMsgBuffMethod · 0.80
SetMsgLenMethod · 0.80

Tested by

no test coverage detected