Since the semantic control is not existed in current system, we have referenced the SHPL[20] to support semantic process definition. Some of details of the SHPL are modified for fitting our system. An entire string input command is also provide for more flexible command format, and some keywords are preserved for easy interpreting the command to machine understandable language.
From our observation, six vital factors are usually included in rack server enclosure peripheral device automation processes: trigger device, target device, action, status, condition, execution time, and location. For example, given a command “if the server temperature is higher than 60 ℃ during 6:00 ~ 18:00, turn the fan to max”, the server is a trigger device; “temperature is higher than 60 ℃” is a condition; 6:00
~ 18:00 is an execution time; the fan is the target device, and “turn to max” is an action.
The command string will be separated into three parts by three keywords, that is
"If", "Target" and " when time". The sentence from the keywords "If" to another two keywords, "Target" and " when time", or end of command will be consider as the
"target" to another two keywords or end of command, will be consider as the description of the target device. The sentence from the keywords " when time " to another two keywords, "Target" and "If", or end of command will be consider as the execution time. For example, the valid command " If FANS at 2F status LOW satisfied TEMP>40 do HIGH to target sourcedevice when time 00:00:00~18:00:00", the " If FANS at 2F status LOW satisfied TEMP>40 do HIGH" will be considered as trigger device part; the "target sourcedevice" will be considered as target device part;
and the "when time 00:00:00~18:00:00" will be considered as execution time part.
Once the whole semantic command is separated into three part, that is description of the trigger device part, description of the target device part and execution time part, we will further parse these three parts independently. The execution time part is mostly easy to understand, because there is only a time right after the keywords
"when time". There are some keywords further describing the trigger device and target device. The word after the keyword "at" will be regarded as the location of trigger device or target device. The word after the keyword "status" will be regarded as the status of trigger device or target device. The word after the keyword " satisfied"
will be regarded as the condition of trigger device or target device. Because of the English grammar often said "If something do some action to something", we put the action variable into description of trigger device part. The word after the keyword "
do" will be regarded as the action doing to the target device. In the whole semantic command, there are only two keywords that are necessary. The keyword can be appear in semantic, but which is not appeared will be regarded as don't care condition.
In other words, we consider all the device are satisfied the condition if the condition is unassigned. For flexibility, the case of every word in the command sentence will be transform to upper case, so the case of word will not affect the result of parsing.
Besides, in our parsing flow the order of keywords in the same part will not affect the
parsing result. In other words, the command " If FANS at 2F status LOW satisfied TEMP>40 do HIGH to target FANS at 2F status LOW when time 00:00:00~18:00:00
" and " If FANS status LOW at 2F satisfied TEMP>40 do HIGH to target FANS at 2F status LOW when time 00:00:00~18:00:00 " will get the same parsing result.
Moreover, the order of each part is also not affect parsing result. In other words, the command "when time 00:00:00~18:00:00 target FANS at 2F status LOW if FANS at 2F status LOW satisfied TEMP>40 do HIGH" and " If FANS status LOW at 2F satisfied TEMP>40 do HIGH to target FANS at 2F status LOW when time 00:00:00~18:00:00 " will get the same parsing result.
Token Is keyword? Is necessary?
when time Yes No 00:00:00~08:00:00 No No
Table 5.1 Analysis of the automatic command by tokens
So far, we have talked how the execution time and description of trigger / target device are parsed from the semantic command. For easier understanding the structure of the semantic command, another valid semantic command " If FANS at 2F status LOW satisfied TEMP>40 do HIGH to target FANS at 2F status LOW when time 00:00:00~18:00:00 " is provided. The meaning table of each token of the example is also provided in table 5.1. As shown in table 5.1, the first column in the table stand for each token separated by blanks. The second column in the table indicate the each token is a keyword or not. If it is a keyword, there must be a variable which describe the keyword condition following the keyword. The third column in the table stand for the token is necessary or not. If the token is not necessary, the semantic command without the token can be also parsed correctly and considering the keyword as don't care.
Section 5-1-2. Keyword definition of semantic control process