2021-12-16 19:31:41 +00:00
|
|
|
version 1 .
|
|
|
|
; Definitions for the internal workings of the Hayes modem driver.
|
|
|
|
|
2021-12-16 22:20:17 +00:00
|
|
|
; Assertion. Declares presence of a Hayes modem.
|
|
|
|
ModemPresent = <modem =hayes @devicePath string @dataspace #!InternalProtocol> .
|
2021-12-16 19:31:41 +00:00
|
|
|
|
|
|
|
; TODO not yet properly specified
|
|
|
|
InternalProtocol = any .
|
|
|
|
|
|
|
|
; Message. Sent when the modem sends us a "URC", an Unsolicited Result Code.
|
|
|
|
UnsolicitedResultCode = <unsolicited @result Result> .
|
|
|
|
|
|
|
|
; Assertion. Asks the modem to execute the given command.
|
2021-12-16 22:20:17 +00:00
|
|
|
ExecuteCommand = <execute-command @commandText string @replyTo CommandContinuation> .
|
|
|
|
CommandContinuation = @replyWanted #!CommandResult / @fireAndForget #f .
|
2021-12-16 19:31:41 +00:00
|
|
|
|
|
|
|
; Assertion. Describes the result of a command execution.
|
|
|
|
CommandResult = <command-result @commandText string @results [Result ...] @finalResult string> .
|
|
|
|
|
|
|
|
@<examples [
|
|
|
|
<unsolicited <result "NO CARRIER" #f #f>>
|
|
|
|
<unsolicited <result "+CRING: VOICE" "CRING" ["VOICE"]>>
|
|
|
|
<unsolicited <result "+CLIP: \"+31655555555\",145,,,,0" "CLIP" ["+31655555555" "145" "" "" "" "0"]>>
|
|
|
|
<unsolicited <result "^DSCI: 2,1,4,0,+31655555555,145" "DSCI" ["2" "1" "4" "0" "+31655555555" "145"]>>
|
|
|
|
<unsolicited <result "+QIND: \"csq\",12,99" "QIND" ["csq" "12" "99"]>>
|
|
|
|
]>
|
|
|
|
Result = <result @text string @tag MaybeString @fields MaybeStrings> .
|
|
|
|
MaybeString = @present string / @absent #f .
|
|
|
|
MaybeStrings = @present [string ...] / @absent #f .
|