21 #ifndef __ASEBA_CONSTS_H 22 #define __ASEBA_CONSTS_H 30 #define ASEBA_VERSION "1.5.5" 33 #define ASEBA_VERSION_INT 10505 36 #define ASEBA_PROTOCOL_VERSION 5 39 #define ASEBA_MIN_TARGET_PROTOCOL_VERSION 4 42 #define ASEBA_DEFAULT_LISTEN_TARGET "tcpin:33333" 45 #define ASEBA_DEFAULT_TARGET "tcp:localhost;33333" 48 #define ASEBA_DEFAULT_HOST "localhost" 51 #define ASEBA_DEFAULT_PORT 33333 57 ASEBA_BYTECODE_STOP = 0x0,
58 ASEBA_BYTECODE_SMALL_IMMEDIATE = 0x1,
59 ASEBA_BYTECODE_LARGE_IMMEDIATE = 0x2,
60 ASEBA_BYTECODE_LOAD = 0x3,
61 ASEBA_BYTECODE_STORE = 0x4,
62 ASEBA_BYTECODE_LOAD_INDIRECT = 0x5,
63 ASEBA_BYTECODE_STORE_INDIRECT = 0x6,
64 ASEBA_BYTECODE_UNARY_ARITHMETIC = 0x7,
65 ASEBA_BYTECODE_BINARY_ARITHMETIC = 0x8,
66 ASEBA_BYTECODE_JUMP = 0x9,
67 ASEBA_BYTECODE_CONDITIONAL_BRANCH = 0xA,
68 ASEBA_BYTECODE_EMIT = 0xB,
69 ASEBA_BYTECODE_NATIVE_CALL = 0xC,
70 ASEBA_BYTECODE_SUB_CALL = 0xD,
71 ASEBA_BYTECODE_SUB_RET = 0xE
78 ASEBA_OP_SHIFT_LEFT = 0x0,
93 ASEBA_OP_BIGGER_EQUAL_THAN,
94 ASEBA_OP_SMALLER_THAN,
95 ASEBA_OP_SMALLER_EQUAL_THAN,
102 #define ASEBA_BINARY_OPERATOR_MASK 0xff 107 ASEBA_UNARY_OP_SUB = 0x0,
109 ASEBA_UNARY_OP_BIT_NOT,
114 #define ASEBA_UNARY_OPERATOR_MASK 0xff 117 #define ASEBA_IF_IS_WHEN_BIT 8 119 #define ASEBA_IF_WAS_TRUE_BIT 9 135 ASEBA_EVENT_INIT = 0xFFFF,
136 ASEBA_EVENT_LOCAL_EVENTS_START = 0xFFFE,
140 #define AsebaBytecodeFromId(id) ((id) << 12) 146 ASEBA_MESSAGE_BOOTLOADER_RESET = 0x8000,
147 ASEBA_MESSAGE_BOOTLOADER_READ_PAGE,
148 ASEBA_MESSAGE_BOOTLOADER_WRITE_PAGE,
149 ASEBA_MESSAGE_BOOTLOADER_PAGE_DATA_WRITE,
152 ASEBA_MESSAGE_BOOTLOADER_DESCRIPTION,
153 ASEBA_MESSAGE_BOOTLOADER_PAGE_DATA_READ,
154 ASEBA_MESSAGE_BOOTLOADER_ACK,
157 ASEBA_MESSAGE_DESCRIPTION = 0x9000,
158 ASEBA_MESSAGE_NAMED_VARIABLE_DESCRIPTION,
159 ASEBA_MESSAGE_LOCAL_EVENT_DESCRIPTION,
160 ASEBA_MESSAGE_NATIVE_FUNCTION_DESCRIPTION,
161 ASEBA_MESSAGE_DISCONNECTED,
162 ASEBA_MESSAGE_VARIABLES,
163 ASEBA_MESSAGE_ARRAY_ACCESS_OUT_OF_BOUNDS,
164 ASEBA_MESSAGE_DIVISION_BY_ZERO,
165 ASEBA_MESSAGE_EVENT_EXECUTION_KILLED,
166 ASEBA_MESSAGE_NODE_SPECIFIC_ERROR,
167 ASEBA_MESSAGE_EXECUTION_STATE_CHANGED,
168 ASEBA_MESSAGE_BREAKPOINT_SET_RESULT,
169 ASEBA_MESSAGE_NODE_PRESENT,
172 ASEBA_MESSAGE_GET_DESCRIPTION = 0xA000,
175 ASEBA_MESSAGE_SET_BYTECODE,
181 ASEBA_MESSAGE_GET_EXECUTION_STATE,
182 ASEBA_MESSAGE_BREAKPOINT_SET,
183 ASEBA_MESSAGE_BREAKPOINT_CLEAR,
184 ASEBA_MESSAGE_BREAKPOINT_CLEAR_ALL,
185 ASEBA_MESSAGE_GET_VARIABLES,
186 ASEBA_MESSAGE_SET_VARIABLES,
187 ASEBA_MESSAGE_WRITE_BYTECODE,
188 ASEBA_MESSAGE_REBOOT,
189 ASEBA_MESSAGE_SUSPEND_TO_RAM,
190 ASEBA_MESSAGE_GET_NODE_DESCRIPTION,
193 ASEBA_MESSAGE_LIST_NODES,
195 ASEBA_MESSAGE_INVALID = 0xFFFF
201 ASEBA_DEST_DEBUG = 0,
202 ASEBA_DEST_INVALID = 0xFFFF
212 #define ASEBA_MAX_EVENT_ARG_SIZE (ASEBA_MAX_EVENT_ARG_COUNT*2) 215 #define ASEBA_MAX_INNER_PACKET_SIZE (ASEBA_MAX_EVENT_ARG_SIZE+2) 218 #define ASEBA_MAX_OUTER_PACKET_SIZE (ASEBA_MAX_INNER_PACKET_SIZE+4) 221 #define ASEBA_MAX_PACKET_SIZE ASEBA_MAX_INNER_PACKET_SIZE 224 #define ASEBA_UNUSED(x) (void)x; AsebaExecutionStates
List of masks for flags in AsebaVMState.
Definition: consts.h:122
This flag is enabled when the VM is running stey by step.
Definition: consts.h:127
AsebaUnaryOperator
List of unary operators.
Definition: consts.h:105
AsebaLimits
Limits for static buffers allocation.
Definition: consts.h:206
AsebaSystemMessagesTypes
Identifiers for remote bootloader and debug protocol.
Definition: consts.h:143
This flag is enabled when a thread is being executed.
Definition: consts.h:125
AsebaMessagesDests
Identifiers for destinations.
Definition: consts.h:199
Maximum number of arguments in an event (in word)
Definition: consts.h:208
This flag is enabled when an event is running inside the debugger's fast loop, and cleared to make th...
Definition: consts.h:129
AsebaBytecodeId
List of bytecodes identifiers.
Definition: consts.h:55
AsebaBinaryOperator
List of binary operators.
Definition: consts.h:75
AsebaSpecialEventId
List of special event ID.
Definition: consts.h:133