Skip to content

Commit

Permalink
subtype -> flags
Browse files Browse the repository at this point in the history
  • Loading branch information
attdona committed Sep 26, 2017
1 parent 058c224 commit 9acb453
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion burba/apps/hello-proto/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ int8_t proto_input_handler(bocia_channel_t *rd, proto_msg_t command_id,

ack.id = command_id.type;

DEBUG("executing [%d,%d] message\n", command_id.type, command_id.subtype);
DEBUG("executing [%d,%d] message\n", command_id.type, command_id.flags);

switch (command_id.type)
{
Expand Down
4 changes: 2 additions & 2 deletions burba/sys/bocia/bocia.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int8_t proto_input_handler(bocia_channel_t *rd, proto_msg_t command_id,

ack.id = command_id.type;

DEBUG("executing [%d,%d] message\n", command_id.type, command_id.subtype);
DEBUG("executing [%d,%d] message\n", command_id.type, command_id.flags);

switch (command_id.type) {
case COMMAND_TYPE: {
Expand Down Expand Up @@ -160,7 +160,7 @@ int8_t bocia_unmarshall(bocia_channel_t *rd, unsigned char *data,
return INPUTHANDLER_ERR;
}

if (ptype.subtype & (1 << DEBUG_OPTION_BIT)) {
if (ptype.flags & (1 << DEBUG_OPTION_BIT)) {
rd->debug = 1;
}

Expand Down
4 changes: 2 additions & 2 deletions burba/sys/bocia/nais.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int8_t setup_header(proto_msg_t msg_type, int msg_len, uint8_t* buff) {
buff[1] = msg_type.type;
buff[2] = 0;
buff[3] = msg_type.dline;
buff[4] = msg_type.subtype;
buff[4] = msg_type.flags;

do {
buff[len_index] = len % 128;
Expand Down Expand Up @@ -96,7 +96,7 @@ proto_msg_t nais_unmarshall(unsigned char *data, void **obj) {
cptr++;
DEBUG("[%02x] ", *cptr);

ptype.subtype = *cptr;
ptype.flags = *cptr;

do {
cptr++;
Expand Down
2 changes: 1 addition & 1 deletion burba/sys/include/nais.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ typedef struct {
/// packet that triggers a response. Set to zero if the
/// packet originates from the board.

uint8_t subtype; ///< NAIS.FLAGS field
uint8_t flags; ///< NAIS.FLAGS field
} proto_msg_t;


Expand Down
4 changes: 2 additions & 2 deletions burba/tests/bocia/test_cases.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int8_t proto_input_handler(bocia_channel_t *rd, proto_msg_t command_id,

ack.id = command_id.type;

DEBUG("executing [%d,%d] message\n", command_id.type, command_id.subtype);
DEBUG("executing [%d,%d] message\n", command_id.type, command_id.flags);

switch(command_id.type) {
case LEDS_TYPE: {
Expand Down Expand Up @@ -91,7 +91,7 @@ int8_t proto_input_handler(bocia_channel_t *rd, proto_msg_t command_id,
}
default:
DEBUG("recv unmanaged type [%d,%d]\n", command_id.type,
command_id.subtype);
command_id.flags);

}
return INPUTHANDLER_OK;
Expand Down
4 changes: 2 additions & 2 deletions burba/tests/sbapp/test_cases.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int8_t proto_input_handler(bocia_channel_t *rd, proto_msg_t command_id,

ack.id = command_id.type;

DEBUG("executing [%d,%d] message\n", command_id.type, command_id.subtype);
DEBUG("executing [%d,%d] message\n", command_id.type, command_id.flags);

switch(command_id.type) {
case LEDS_TYPE: {
Expand Down Expand Up @@ -96,7 +96,7 @@ int8_t proto_input_handler(bocia_channel_t *rd, proto_msg_t command_id,
}
default:
DEBUG("recv unmanaged type [%d,%d]\n", command_id.type,
command_id.subtype);
command_id.flags);

}
return INPUTHANDLER_OK;
Expand Down

0 comments on commit 9acb453

Please sign in to comment.