decode_timebox command to convert an internal timebox value that defines when a role is enabled or disabled into a format that can be evaluated. The command converts the internal hexadecimal value for a role timebox to a hexadecimal timebox value format as described in Timebox value format
The command returns a 168-bit value in hexadecimal format that delineates the hours of the week from midnight Sunday to 11 PM Saturday in order from most-significant bit to least-significant bit. If a bit is set to 1, its corresponding hour is enabled for the role. If set to 0, its corresponding hour is disabled.
This command is useful for deciphering the value returned by the get_role_field for the timebox field.
This command takes no options.
This command takes the following arguments:
A 42-digit hexadecimal timebox value. A value of zero disables all hours of the week. A value of
This command returns a decoded hexadecimal value that is the timebox value for a role.
>select_role test1 >get_role_field timebox FFF7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF >package require ade_lib 1.0 >decode_timebox [grf timebox]
This example returns the decoded 42 hexadecimal that indicates the role is disabled from midnight to one on Sunday:
Related Tcl library commands
The following commands perform actions related to this command: