24 #include <interfaces/KickerInterface.h>
26 #include <core/exceptions/software.h>
45 KickerInterface::KickerInterface() : Interface()
47 data_size =
sizeof(KickerInterface_data_t);
49 data = (KickerInterface_data_t *)
data_ptr;
60 unsigned char tmp_hash[] = {0x96, 0x3d, 0x55, 0x60, 0xfd, 0x65, 0xf2, 0xfa, 0xa8, 0xfa, 0xfc, 0xaa, 0xb6, 0xfc, 0xc2, 0x81};
65 KickerInterface::~KickerInterface()
77 case GUIDE_BALL_LEFT:
return "GUIDE_BALL_LEFT";
78 case GUIDE_BALL_RIGHT:
return "GUIDE_BALL_RIGHT";
79 default:
return "UNKNOWN";
92 return data->num_kicks_left;
114 data->num_kicks_left = new_num_kicks_left;
127 return data->num_kicks_center;
149 data->num_kicks_center = new_num_kicks_center;
162 return data->num_kicks_right;
184 data->num_kicks_right = new_num_kicks_right;
217 data->guide_ball_side = new_guide_ball_side;
230 return data->current_intensity;
252 data->current_intensity = new_current_intensity;
260 if ( strncmp(
"KickMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
262 }
else if ( strncmp(
"ResetCounterMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
264 }
else if ( strncmp(
"GuideBallMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
268 "message type for this interface type.", type);
284 memcpy(data, oi->data,
sizeof(KickerInterface_data_t));
290 if (strcmp(enumtype,
"GuideBallSideEnum") == 0) {
315 data = (KickMessage_data_t *)
data_ptr;
317 data->left = ini_left;
318 data->center = ini_center;
319 data->right = ini_right;
320 data->intensity = ini_intensity;
332 data = (KickMessage_data_t *)
data_ptr;
354 data = (KickMessage_data_t *)
data_ptr;
386 data->left = new_left;
416 data->center = new_center;
446 data->right = new_right;
456 return data->intensity;
476 data->intensity = new_intensity;
499 data_size =
sizeof(ResetCounterMessage_data_t);
502 data = (ResetCounterMessage_data_t *)
data_ptr;
520 data = (ResetCounterMessage_data_t *)
data_ptr;
547 data_size =
sizeof(GuideBallMessage_data_t);
550 data = (GuideBallMessage_data_t *)
data_ptr;
552 data->guide_ball_side = ini_guide_ball_side;
558 data_size =
sizeof(GuideBallMessage_data_t);
561 data = (GuideBallMessage_data_t *)
data_ptr;
580 data = (GuideBallMessage_data_t *)
data_ptr;
612 data->guide_ball_side = new_guide_ball_side;