ronelib
Operating System for the r-one robot
 All Data Structures Files Functions Variables Typedefs
behaviorSystem.h
Go to the documentation of this file.
1 
10 #ifndef BEHAVIORSYSTEM_H_
11 #define BEHAVIORSYSTEM_H_
12 
13 #define BEHAVIOR_TASK_PRIORITY (BACKGROUND_TASK_PRIORITY + 1)
14 #define BEHAVIOR_TASK_PERIOD 50
15 
19 typedef struct Beh {
20  int32 tv;
21  int32 rv;
22  boolean active;
23 } Beh;
24 
25 extern const Beh behInactive;
26 
27 // behavior system
28 //TODO Should brief be more specific?
34 void behaviorSystemInit(void (*behaviorTask)(void* parameters), uint32 stackSize);
35 
36 
44 void motorSetBeh(Beh* behPtr);
45 
46 
53 uint8 behGetTv(Beh* behPtr);
54 
55 
64 void behSetTvRv(Beh* behPtr, int32 tv, int32 rv);
65 
66 
74 void behSetTv(Beh* behPtr, int32 tv);
75 
76 
84 void behSetRv(Beh* behPtr, int32 rv);
85 
86 
93 uint8 behGetRv(Beh* behPtr);
94 
95 
102 uint8 behIsActive(Beh* behPtr);
103 
104 
111 void behSetActive(Beh* behPtr);
112 
113 
120 void behSetInactive(Beh* behPtr);
121 
122 
133 boolean buttonModeRGB(uint8* modePtr, uint8 modeRed, uint8 modeGreen, uint8 modeBlue);
134 
146 Beh* behSubsume(Beh* behOutPtr, Beh* behInLoPtr, Beh* behInHighPtr);
147 #endif /* BEHAVIORSYSTEM_H_ */