name=Gateway Support
category=Unix Host

description=Software that supports a CLI based application running on a gateway-style device that has a POSIX compatible operating system.   This plugin is NOT compatible with an system-on-a-chip (SOC) platform (i.e. 250 or 357 SOC).

qualityString=Sample Code
quality=test

sourceFiles=gateway-support.c, backchannel-support.c, gateway-support-cli.c

providedApis=gateway

requiredPlugins=file-descriptor-dispatch
implementedCallbacks=emberAfMainStartCallback

setup(bookkeeping) {
  init=emberAfPluginGatewayInitCallback
  tick=emberAfPluginGatewayTickCallback
}

options=maxFds, tcpPortOffset, maxWaitForEventTimeoutMs

maxFds.name=Max File Descriptors to Monitor
maxFds.description=The maximum number of file descriptors that the gateway application can monitor for activity with select().
maxFds.type=NUMBER:3,255
maxFds.default=10

tcpPortOffset.name=TCP Port Offset
tcpPortOffset.description=The gateway application supports remote CLI connections via TCP.  This option defines the starting TCP port on the local system where the gateway will accept connections.  The first port X (i.e. 4900 by default) will be used for the CLI, while the X+1 port (i.e. 4901 by default) will be used for the raw connection.  The raw port is used to send/receive binary data.
tcpPortOffset.type=NUMBER:1,65535
tcpPortOffset.default=4900

maxWaitForEventTimeoutMs.name=Maximum Time to Wait for Events (milliseconds)
maxWaitForEventTimeoutMs.description=Maximum amount of time the Gateway Support plugin will allow the framework to yield the processor.  In other words, the max timeout to select().  Normally the framework limits its yield time due to whatever App Framework events and user created events are scheduled to run.  This further limits it to allow the main loop to run more frequently at the expense of CPU cycles.  This is a simpler way of insuring the main loop periodically runs.  The recommended way is to schedule an event through the framework.  
maxWaitForEventTimeoutMs.type=NUMBER
maxWaitForEventTimeoutMs.default=0xFFFFFFFF
