下面这段代码是什么意思啊?一直看不懂,我基础较差,希望高手能帮我提醒几个关键点。急急急,在线等
DECISION(l_single_obj_size=l_single_obj_data_len);(T):/*allocatebuffertostorerecivedd...
DECISION (l_single_obj_size = l_single_obj_data_len);
(T):
/* allocate buffer to store recived data */
DECISION allocate_buffer_r (l_single_obj_data_len * l_obj_count_in_msg, time_limit_t_no_time_limit_c, l_new_rec_pah);
(T):
/* create pointer and handle for new buffer */
TASK l_new_rec_handle := l_new_rec_pah.to_handle_r;
TASK l_new_rec_ptr := data_pointer__t(l_new_rec_pah.to_ptr_r);
/* initialize buffer to all zero */
TASK memset(bytepointer(l_new_rec_ptr), 0, l_single_obj_data_len * l_obj_count_in_msg);
/* get header length */
TASK l_msg_header_len := SIZEOF(l_data_validity) + SIZEOF(l_single_obj_data_len) + SIZEOF(l_obj_count_in_msg);
/* skip to objects part */
TASK l_tmp_msg_ptr := ADDPTR(bytepointer(l_msg_ptr), l_msg_header_len);
/* copy objects to new buffer */
TASK memcpy (bytepointer(l_new_rec_ptr), bytepointer(l_tmp_msg_ptr), dword(l_single_obj_data_len * l_obj_count_in_msg));
/* process objects one by one */
CALL process_obj_one_bye_one__r(l_obj_count_in_msg, l_single_obj_data_len, l_new_rec_ptr, l_obj_dupli_num, l_out_of_range, l_obj_duplicate_flag);
/* Count current ack msg received from one DP indicated by l_status no_more_data_ec, ignore if the object index is out of range */
DECISION ((l_out_of_range = F) AND (l_data_validity = no_more_data_ec));
(T):
TASK g_multi_msg_recv := g_multi_msg_recv + 1;
ENDDECISION;
/* print out duplicate object numbers for combined mode */
DECISION (l_obj_dupli_num > 0) AND (g_service_conf.combined = F);
(T):
TASK dxsyslog_r(log_type_t_test_c + log_type_t_sp_c,
@'AMNMEA: receive duplicate object'
'l_obj_dupli_num :%d'
'g_obj_recv_count :%d'
'g_obj_current_send :%d'
'g_obj_i :%d',
l_obj_dupli_num, g_obj_recv_count,
g_obj_current_send, g_obj_i);
ENDDECISION;
TASK free_buffer_r (l_new_rec_handle);
ELSE:
TASK g_error_obj_ack := T;
TASK g_obj_recv_count := g_obj_recv_count + l_obj_count_in_msg;
TASK l_status := osc_status();
TASK write_to_log(log_type_t_dword_e_c,log_write_item_t(@l_status),1,
log_text_info_t(@'AMNMEA: statis_data_ack_multi_obj_s received allocate_buffer_r failed'));
ENDDECISION;
ELSE:
TASK g_error_obj_ack := T; 展开
(T):
/* allocate buffer to store recived data */
DECISION allocate_buffer_r (l_single_obj_data_len * l_obj_count_in_msg, time_limit_t_no_time_limit_c, l_new_rec_pah);
(T):
/* create pointer and handle for new buffer */
TASK l_new_rec_handle := l_new_rec_pah.to_handle_r;
TASK l_new_rec_ptr := data_pointer__t(l_new_rec_pah.to_ptr_r);
/* initialize buffer to all zero */
TASK memset(bytepointer(l_new_rec_ptr), 0, l_single_obj_data_len * l_obj_count_in_msg);
/* get header length */
TASK l_msg_header_len := SIZEOF(l_data_validity) + SIZEOF(l_single_obj_data_len) + SIZEOF(l_obj_count_in_msg);
/* skip to objects part */
TASK l_tmp_msg_ptr := ADDPTR(bytepointer(l_msg_ptr), l_msg_header_len);
/* copy objects to new buffer */
TASK memcpy (bytepointer(l_new_rec_ptr), bytepointer(l_tmp_msg_ptr), dword(l_single_obj_data_len * l_obj_count_in_msg));
/* process objects one by one */
CALL process_obj_one_bye_one__r(l_obj_count_in_msg, l_single_obj_data_len, l_new_rec_ptr, l_obj_dupli_num, l_out_of_range, l_obj_duplicate_flag);
/* Count current ack msg received from one DP indicated by l_status no_more_data_ec, ignore if the object index is out of range */
DECISION ((l_out_of_range = F) AND (l_data_validity = no_more_data_ec));
(T):
TASK g_multi_msg_recv := g_multi_msg_recv + 1;
ENDDECISION;
/* print out duplicate object numbers for combined mode */
DECISION (l_obj_dupli_num > 0) AND (g_service_conf.combined = F);
(T):
TASK dxsyslog_r(log_type_t_test_c + log_type_t_sp_c,
@'AMNMEA: receive duplicate object'
'l_obj_dupli_num :%d'
'g_obj_recv_count :%d'
'g_obj_current_send :%d'
'g_obj_i :%d',
l_obj_dupli_num, g_obj_recv_count,
g_obj_current_send, g_obj_i);
ENDDECISION;
TASK free_buffer_r (l_new_rec_handle);
ELSE:
TASK g_error_obj_ack := T;
TASK g_obj_recv_count := g_obj_recv_count + l_obj_count_in_msg;
TASK l_status := osc_status();
TASK write_to_log(log_type_t_dword_e_c,log_write_item_t(@l_status),1,
log_text_info_t(@'AMNMEA: statis_data_ack_multi_obj_s received allocate_buffer_r failed'));
ENDDECISION;
ELSE:
TASK g_error_obj_ack := T; 展开
4个回答
展开全部
这是visual c++的资源文件
DIALOGEX是定义对话框资源的命令
105 DIALOGEX 0, 0, 280, 162
定义一个对话框,资源编号id是105,位置起始在屏幕0,0(可以被风格定义中的center等等覆盖,所以其实这个起始位置有些时候定义了也是白定义),宽和高分别为280和162
STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
定义风格,后面各项都是风格内容,这里用到了6个分别是,系统固定字体(取代系统默认字体),对话框放到屏幕中央,对话框有最小化按钮,弹出窗口风格,有标题,有窗口系统菜单
CAPTION ""
标题为空
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
采用英语系的美式英语
FONT 8, "MS Shell Dlg"
采用MS Shell Dlg逻辑字体,大小为8
以下定义对话框中的控件
{
CONTROL "", 3, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_GROUP | WS_TABSTOP, 171, 142, 50, 14
控件,控件上的文字,编号,该控件是一个按钮,按钮风格是下压按钮(各风格含义参考msdn文档),位置的xy坐标和宽高。
以下类似
CONTROL "", 1, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 223, 142, 50, 14
CONTROL "", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 142, 50, 14
CONTROL "", -1, STATIC, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 138, 267, 1
这个是字符串显示,不是按钮了
以下同
CONTROL "", 1018, STATIC, SS_BLACKRECT | WS_CHILD | WS_GROUP, 7, 6, 266, 130
CONTROL "", 1028, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP, 59, 145, 108, 8
}
另一段是同样的格式,格式在msdn里面都有详述。只是用到了不同的控件,依次是:
进程条,字符串,列表视图,字符串,按钮。
每个控件的定义语句遵循同样的格式,依次是:
定义控件,文字,编号,控件类型,风格,坐标,大小。
DIALOGEX是定义对话框资源的命令
105 DIALOGEX 0, 0, 280, 162
定义一个对话框,资源编号id是105,位置起始在屏幕0,0(可以被风格定义中的center等等覆盖,所以其实这个起始位置有些时候定义了也是白定义),宽和高分别为280和162
STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
定义风格,后面各项都是风格内容,这里用到了6个分别是,系统固定字体(取代系统默认字体),对话框放到屏幕中央,对话框有最小化按钮,弹出窗口风格,有标题,有窗口系统菜单
CAPTION ""
标题为空
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
采用英语系的美式英语
FONT 8, "MS Shell Dlg"
采用MS Shell Dlg逻辑字体,大小为8
以下定义对话框中的控件
{
CONTROL "", 3, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_GROUP | WS_TABSTOP, 171, 142, 50, 14
控件,控件上的文字,编号,该控件是一个按钮,按钮风格是下压按钮(各风格含义参考msdn文档),位置的xy坐标和宽高。
以下类似
CONTROL "", 1, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 223, 142, 50, 14
CONTROL "", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 142, 50, 14
CONTROL "", -1, STATIC, SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 138, 267, 1
这个是字符串显示,不是按钮了
以下同
CONTROL "", 1018, STATIC, SS_BLACKRECT | WS_CHILD | WS_GROUP, 7, 6, 266, 130
CONTROL "", 1028, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP, 59, 145, 108, 8
}
另一段是同样的格式,格式在msdn里面都有详述。只是用到了不同的控件,依次是:
进程条,字符串,列表视图,字符串,按钮。
每个控件的定义语句遵循同样的格式,依次是:
定义控件,文字,编号,控件类型,风格,坐标,大小。
追问
额,好像完全不搭啊
展开全部
这么神马语言?好晕,你就看英文注释那些行就好了。
追问
高手,你能看懂吗
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
NOKIA 的TNSDL 语言,诺基亚自己的语言。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Haskell ??
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询