You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
klish/xml-examples/clish/clock.xml

69 lines
2.9 KiB

<?xml version="1.0" encoding="UTF-8"?>
<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema
http://clish.sourceforge.net/XMLSchema/clish.xsd">
<!--=======================================================-->
<PTYPE name="TIME_HHMMSS"
pattern="(([0-1][0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9])"
help="HH:MM:SS using 24 hour clock"/>
<!--=======================================================-->
<PTYPE name="TZ_OFFSET_HR"
method="integer"
pattern="-12..12"
help="Time offset from UTC"/>
<!--=======================================================-->
<PTYPE name="DAY_MONTH"
method="integer"
pattern="0..31"
help="Calendar day of month"/>
<!--=======================================================-->
<PTYPE name="MONTH_NAME"
method="select"
pattern="January(1) February(2) March(3) April(4) May(5) June(6) July(7) August(8) September(9) October(10) November(11) December(12)"
help="Month of the year"/>
<!--=======================================================-->
<PTYPE name="TZ_NAME"
method="select"
pattern="GMT(GreenwichMeanTime) PST(PacificStandardTime) EST(EasternStandardTime)"
help="Timezone Name" />
<!--=======================================================-->
<PTYPE name="YYYY_YEAR"
method="integer"
pattern="1993..2035"
help="Year"/>
<!--=======================================================-->
<COMMAND name="clock"
help="some utility commands for time related details"/>
<!--=======================================================-->
<COMMAND name="clock set"
help="Set the time and date">
<PARAM name="time"
help="Current time"
ptype="TIME_HHMMSS"/>
<PARAM name="day"
help="Day of the month"
ptype="DAY_MONTH"/>
<PARAM name="month"
help="Month of year"
ptype="MONTH_NAME"/>
<PARAM name="year"
help="Year"
ptype="YYYY_YEAR"/>
<ACTION>echo SET-TIME time:${time} day:${day} month:${month} year:${year}</ACTION>
</COMMAND>
<!--=======================================================-->
<COMMAND name="clock timezone"
help="Set the timezone">
<PARAM name="zone"
help="The time zone"
ptype="TZ_NAME"/>
<PARAM name="hours"
help="The offset from the UTC"
ptype="TZ_OFFSET_HR"/>
<ACTION>echo TIMEZONE zone: ${zone} hours:${hours}</ACTION>
</COMMAND>
<!--=======================================================-->
</CLISH_MODULE>