0.5.1 updates: !working events in scheduler

main
Samantha Wright 2024-07-01 21:32:07 -07:00
parent a68267b5cf
commit 63f4e418b1
3 changed files with 13 additions and 1 deletions

6
ARES/a
View File

@ -41,7 +41,7 @@
#define ARES
// version that OS components will report:
#define ARES_VERSION "0.5.0"
#define ARES_VERSION "0.5.1"
#define ARES_VERSION_TAGS "beta 3"
// copyright year for the OS:
@ -314,6 +314,10 @@ string E_PROGRAM_NUMBER = "!!";
// The warning event triggers whenever a warning is issued by a daemon. This is meant only to be monitored by the _display program. Ideally this would be a notify message, but using an event hook fails gracefully if a warning is generated before _display is registered with the kernel. Specified as 11 <slot> <message>, e.g. "11 2 6" displays 'RADIATION DANGER' in slot 2; see interface.consts.h.lsl for list.
#define EVENT_WARNING 0x00b
// The "working" events aren't meant to be hooked by any programs, but rather used as a reliable way to tell the scheduler daemon itself when to show the working badge. They are called as "16 <text>", and "17 <text>", respectively. The <text> on the begin and end must match, and will be visible to the user. Convenience macros are defined in scheduler.h.lsl.
#define EVENT_WORKING_BEGIN 0x010
#define EVENT_WORKING_END 0x011
/*
MODE DEFINITIONS

View File

@ -48,10 +48,14 @@
#define query_hooks() kernel(SIGNAL_QUERY_HOOKS, "")
#define hook_events(...) kernel(SIGNAL_HOOK_EVENT, PROGRAM_NAME + "," + concat(__VA_ARGS__, ","))
#define unhook_events(...) kernel(SIGNAL_UNHOOK_EVENT, PROGRAM_NAME + "," + concat(__VA_ARGS__, ","))
#define begin_working(_reason) kernel(SIGNAL_TRIGGER_EVENT, (string)EVENT_WORKING_BEGIN + " " + (_reason))
#define end_working(_reason) kernel(SIGNAL_TRIGGER_EVENT, (string)EVENT_WORKING_END + " " + (_reason))
#else
#define query_hooks() tell(DAEMON, C_SCHEDULER, E_SIGNAL_QUERY_HOOKS + PROGRAM_NAME)
#define hook_events(...) tell(DAEMON, C_SCHEDULER, E_SIGNAL_HOOK_EVENT + PROGRAM_NAME + "," + concat(__VA_ARGS__, ","))
#define unhook_events(...) tell(DAEMON, C_SCHEDULER, E_SIGNAL_UNHOOK_EVENT + PROGRAM_NAME + "," + concat(__VA_ARGS__, ","))
#define begin_working(_reason) tell(DAEMON, C_SCHEDULER, E_SIGNAL_TRIGGER_EVENT + (string)EVENT_WORKING_BEGIN + " " + (_reason))
#define end_working(_reason) tell(DAEMON, C_SCHEDULER, E_SIGNAL_TRIGGER_EVENT + (string)EVENT_WORKING_END + " " + (_reason))
#endif
// create a timer (interval must be an integer)

View File

@ -96,6 +96,8 @@ MESSAGES
<label> is a freeform text label that describes the volume.
If no access is granted, the device should send the "denied" command.
In normal operation the system will send a "stat" message for the special file "*" after access is granted.
<handle> disconnect
@ -110,6 +112,8 @@ MESSAGES
system -> storage
The system wants to know the size and type of a file. Please send it in reply with the message below.
If <filename> is "*", the system is inquiring about the current (root) directory.
<handle> stat <amount> <type> <desc>