int s;
unsigned can_id;
struct BAP_RXer *bap;
- unsigned sub_node_id;
+ unsigned node_id;
if (argc < 4) {
- printf("syntax: %s IFNAME CAN_ID SubNode \n", argv[0]);
+ printf("syntax: %s IFNAME CAN_ID bap_node \n", argv[0]);
return 1;
}
can_id = strtoul(argv[2], NULL, 0);
- sub_node_id = strtoul(argv[3], NULL, 0);
+ node_id = strtoul(argv[3], NULL, 0);
bap = vw_bap_alloc();
if (!bap) {
return 1;
}
- printf("Listening for CAN ID: %x and SubNode %d\n", can_id, sub_node_id);
+ printf("Listening for CAN ID: %x and Node %d\n", can_id, node_id);
unsigned i;
bap_frame = vw_bap_handle_can_frame(bap, &frame);
- if (bap_frame && bap_frame->subnode == sub_node_id) {
+ if (bap_frame && bap_frame->node == node_id) {
mvprintw(bap_frame->function, 0, "");
printw("%u. %2i/%-2i .%02i --",
bap_frame->opcode,
- bap_frame->subnode,
+ bap_frame->node,
bap_frame->function,
bap_frame->len);
printf("%u. %2i/%-2i .%02i --",
bap_frame->opcode,
- bap_frame->subnode,
+ bap_frame->node,
bap_frame->function,
bap_frame->len);
header = (frame->data[2] << 8) | frame->data[3];
bap_frame->opcode = (header >> 12) & 0x7;
- bap_frame->subnode = (header >> 6) & 0x3F;
+ bap_frame->node = (header >> 6) & 0x3F;
bap_frame->function = (header >> 0) & 0x3F;
bap_frame->len = ((frame->data[0] & 0xF) << 8) | frame->data[1];
header = (frame->data[0] << 8) | frame->data[1];
bap_frame->opcode = (header >> 12) & 0x7;
- bap_frame->subnode = (header >> 6) & 0x3F;
+ bap_frame->node = (header >> 6) & 0x3F;
bap_frame->function = (header >> 0) & 0x3F;
this_len = frame->can_dlc - 2;
typedef unsigned char BAP_OpCode;
-typedef unsigned char BAP_SubNode;
-typedef unsigned char BAP_SubFunction;
+typedef unsigned char BAP_Node;
+typedef unsigned char BAP_Function;
typedef unsigned short BAP_FrameLen;
int is_multiframe;
BAP_OpCode opcode;
- BAP_SubNode subnode;
- BAP_SubFunction function;
+ BAP_Node node;
+ BAP_Function function;
BAP_FrameLen len;
char data[4096];