Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Structures | Macros | Functions | Variables
SCHEDULE

Comm Driver Test Code. More...

Data Structures

struct  T_scheduleEvent
 
struct  T_scheduleHandleStruct
 

Macros

#define TEST_PACKET_LEN   LONG_PACKET_LENGTH
 

Functions

T_void CommTest (T_void)
 
T_void CommTestOld (T_void)
 
T_void IScheduleInsertSortEvent (T_scheduleEvent *p_newEvent, T_word32 when)
 
T_void ScheduleAddEvent (T_word32 when, T_scheduleEventHandler handler, T_word32 data)
 
T_void ScheduleClearEvents (T_void)
 
E_Boolean ScheduleUpdateEvents (T_void)
 
T_void SendViaPacket (T_byte8 c)
 
T_void SendViaPacketData (T_byte8 *str, T_word16 len)
 

Variables

T_packetLong packet
 
T_word16 packetIndex = 0
 

Detailed Description

Comm Driver Test Code.

Scheduler of Events.

Old communications test code.

See Also
http://www.amuletsandarmor.com/AALicense.txt

In support of scripts with delayed timing, events are put on a scheduler.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Macro Definition Documentation

#define TEST_PACKET_LEN   LONG_PACKET_LENGTH

Function Documentation

T_void CommTest ( T_void  )
T_void CommTestOld ( T_void  )
T_void IScheduleInsertSortEvent ( T_scheduleEvent p_newEvent,
T_word32  when 
)

IScheduleInsertSortEvent adds a new event to the event list and tries to find a position where the event is in order from earliest to latest.

Parameters
p_newEvent– Event to add
when– When the event is to occur
T_void ScheduleAddEvent ( T_word32  when,
T_scheduleEventHandler  handler,
T_word32  data 
)

ScheduleAddEvent adds an event to the schedule list based on the ticker clock. When this event goes off, the handler is called and the passed in data is passed to the handler.

Parameters
when– Ticker time for event to occur
handler– Callback routine for event
data– Data to store with event (note that this could be a pointer cast as a 32 bit value).
T_void ScheduleClearEvents ( T_void  )

ScheduleClearEvents removes all events from the schedule. This is useful when you need to quit processing those events.

E_Boolean ScheduleUpdateEvents ( T_void  )

ScheduleUpdateEvents looks at the beginning of the schedule list and sees if there is an action it needs to perform. If there is, that action is taken and the appropriate callback routine is called. The event is then discarded and another attempt is made.

Returns
Flag that tells if an event occured
T_void SendViaPacket ( T_byte8  c)
T_void SendViaPacketData ( T_byte8 str,
T_word16  len 
)

Variable Documentation

T_packetLong packet
T_word16 packetIndex = 0