Timer Device

Description

The timer device is a software-based "device" which allows CDJ and SlinkX control users to generate timed events. The timer device is simple but versatile. By setting "alarms" using the timer device, you can:

When used in conjunction with the mapping capabilities of CDJ, it possible to use timers to play music at certain times, add items to playlists for advertising, or search the players late at night.

Note that a single timer device can have multiple alarms, so you will never need more than one timer device. You can create a timer device by using a device file containing the single statement:

type = timer

and adding this device file with Ports = 0, IDNumber = 1. Using the AddDeviceText method makes this even simpler by not requiring an actual device file, only a text string "type = timer". Although there are no commands in this device file you have loaded, slinkeserv supports the following hard-coded command and response functions

Commands

alarmname is a text name which will be used when the alarm generates and event, or when you need to delete the alarm using clralarm. 

alarmtime is the time at which the alarm will first go off. It can absolute or relative expression.

Absolute - some examples of absolute times

Relative - these formats express time as an offset to the future from the current time. The default unit is the second, and the following units are supported:

interval is the time between repetitions of the alarm event. This parameter is not necessary if your alarm does not repeat. The format is the same as that used for relative time in the alarmtime parameter.

repeat is the number of times the alarm event will be repeated at the specified interval. This parameter is optional. The following values are valid

format is a string which specifies the format in which you would like the current time presented when your alarm fires. This is an optional paramter. The string can contain the following elements:

The default format is %H:%M, which expresses the time in hours and minutes separated by a colon.

Sample Usage

setalarm[goodmorning,3/12/2002 08:17:23]

 would result in the following output on the morning of 3/12/2002:

goodmorning[08:17]

setalarm[goodnight,23:30,1d,6,%a]

 would result in the following output every night at 11:30pm for the next week:

goodnight[mon]

goodnight[tue]

goodnight[wed]

goodnight[thu]

goodnight[fri]

goodnight[sat]

goodnight[sun]

setalarm[chime,2h,1h,forever]

 would result in the following output 2 hours later and repeating indefinitely once an hour:

chime[13:56]

chime[14:56]

chime[15:56]

chime[16:56]

chime[17:56]

chime[18:56]

chime[19:56]

chime[20:56]

chime[21:56]

. . .