External Data Input: Difference between revisions
From Zenitel Wiki
| Line 43: | Line 43: | ||
The rule below will allow you to issue commands to EDI port like this: | The rule below will allow you to issue commands to EDI port like this: | ||
* Input command on EDI serial port: '''connect,101,103''' | * Input command on EDI serial port: '''connect,101,103''' | ||
:-Generates internal command '''$CALL L101 L103''' | :- Generates internal command '''$CALL L101 L103''' | ||
*Input command on EDI serial port: '''disconnect,101,103''' | *Input command on EDI serial port: '''disconnect,101,103''' | ||
:-Generates internal commands '''$C L101''' and '''$C L103''' | :- Generates internal commands '''$C L101''' and '''$C L103''' | ||
tmp 0 "%scutf(%edi,\,,0)" | tmp 0 "%scutf(%edi,\,,0)" | ||
Revision as of 20:36, 26 November 2007
Event description
| Event Owner: | EDI Text Config |
| Event type: | 28 - External Data Input |
| Subevent: | 1 – 4: specifies which EDI port. 0: matches all ports |
| When change to ON: | When valid data is received on EDI port |
| When change to OFF: | N/A |
| When related to: | N/A |
Additional information
- Input message
- - The EDI port is defined in the ‘Serial Ports’ Setup
- - The input message must have a termination character. Max 128 char.
- - Parsing the content is done in the action string in the Event Handler
- Context parameters
- Useful macros and statements
Example
The rule below will allow you to issue commands to EDI port like this:
- Input command on EDI serial port: connect,101,103
- - Generates internal command $CALL L101 L103
- Input command on EDI serial port: disconnect,101,103
- - Generates internal commands $C L101 and $C L103
tmp 0 "%scutf(%edi,\,,0)" tmp 1 "%scutf(%edi,\,,1)" tmp 2 "%scutf(%edi,\,,2)" if %scmp(%tmp(0),connect) $CALL L%tmp(1) L%tmp(2) stop endif if %scmp(%tmp(0),disconnect) $C L%tmp(1) $C L%tmp(2) endif

