IPCServerSampleAppConfig

The IPCServerSampleAppConfig file contains parameters that enable additional functionality for the Inter-Process Communication (IPC) Server Sample App beyond the AlexaClientSDKConfig file. The configuration manages assertion of the device's visual characteristics capabilities and manages windows for rendering Alexa Presentation Language (APL) responses. The configuration also manages configuration of the reference websocket server that is used for communication between the IPC Server Sample App and an IPC client app.

Additionally, the IPCServerSampleAppConfig file provides the sampleClientConfig pass-through parameter that enables configuration of your connected IPC client, such as an instance of the Alexa Smart Screen Web Components Sample Application.

Sample configurations

The default IPCServerSampleAppConfig file is a reference implementation for a TV device that displays both full-screen and overlay window (also called lower-third window) visual responses.

The following table shows additional sample device configurations for the IPC Server Sample App in the config/samples directory.

Device configuration Description
TV Fullscreen Only Sample TV device without a lower-third window.
Hub Large Landscape Sample counter-top device with a touch display.
Hub Orientable Sample touch-display device that can change orientation.
Resizable Desktop App Sample desktop application with a resizable window.
Hub Round Sample touch-display device with a round screen.

Configuration parameters

The following example shows the parameters of the IPC Server Sample App configuration file.


{
  "version": "3.0",  
  "sampleApp": {
    "websocket: {
        "websocketInterface":"{{STRING}}",
        "websocketPort":{{NUMBER}},
        "websocketCertificateAuthority":"{{STRING}}",
        "websocketCertificate":"{{STRING}}",
        "websocketPrivateKey":"{{STRING}}",     
    },
    "aplContentCache": {
        "contentCacheReusePeriodInSeconds": "{{STRING}}",
        "contentCacheMaxSize": "{{STRING}}",
        "maxNumberOfConcurrentDownloads": "{{STRING}}"
    }
  },
  "alexaPresentationCapabilityAgent": {
    "minStateReportIntervalMs": {{NUMBER}},
    "stateReportCheckIntervalMs": {{NUMBER}},
    "video": {
        "codecs": [
            {{STRING}},
            ...
        ]
    }
  },
  "visualCharacteristics": [
    {{Alexa.InteractionMode}},
    {{Alexa.Display.Window}},
    {{Alexa.Display}}
  ],
  "presentationOptions": {
    "shortPresentationTimeoutMs": {{NUMBER}},
    "transientPresentationTimeoutMs": {{NUMBER}},
    "longPresentationTimeoutMs": {{NUMBER}}
  },
  "sampleClientConfig": {{SAMPLE_CLIENT_CONFIG}}
}
 

The following table shows the parameters of the IPC Server Sample App configuration file.

Parameter Description Type Required
version Version number for the configuration that is associated with the AVS Device SDK version. string Yes
sampleApp Configuration that extends the parameters of the AlexaClientSDK sampleApp definition. sampleApp No
alexaPresentationCapabilityAgent Configuration for Alexa Presentation Capability Agent. alexaPresentationCapabilityAgent No
visualCharacteristics Configuration for defining device-reported visual characteristics. visualCharacteristics Yes
presentationOptions Configuration options for visual presentations managed by the SDK. presentationOptions No
sampleClientConfig Configuration for the connected IPC client. sampleClientConfig Yes

SampleApp parameters

SampleApp contains parameters for the IPC Sample App. Use the parameters in the following example to configure the websocket server that is used for message communication between the SDK SampleApp and the GUI App and caching of imported packages.

The following example shows the SampleApp parameters.


"sampleApp": {
    "websocket: {
        "websocketInterface":"{{STRING}}",
        "websocketPort":{{NUMBER}},
        "websocketCertificateAuthority":"{{STRING}}",
        "websocketCertificate":"{{STRING}}",
        "websocketPrivateKey":"{{STRING}}",     
    },
    "aplContentCache": {
        "contentCacheReusePeriodInSeconds": "{{STRING}}",
        "contentCacheMaxSize": "{{STRING}}",
        "maxNumberOfConcurrentDownloads": "{{STRING}}"
    }
}
 

The following table shows the SampleApp parameters.

Parameter Description Type Required
websocket Configuration for the websocket server that is implemented by the IPC Sample App. Websocket No
aplContentCache Configuration for caching APL package imports. AplContentCache No

Websocket parameters

Websocket contains parameters for the websocket server that is implemented by the IPC Sample App. The following table shows the parameters for the server.

The following table shows the Websocket parameters.

Parameter Description Type Default Required
websocketInterface The interface that the websocket server binds to.
Important: For security reasons, Amazon strongly recommends that you use the loopback interface. If you use interfaces other than loopback, you must take additional security measures to safeguard the security and integrity of data between the client and server.
string "127.0.0.1" No
websocketPort The port that the websocket server listens to.
Important: The port should be a positive integer in the range [1-65535], Amazon strongly recommends that you use a port number higher than 1023.
number 8933 No
websocketCertificateAuthority The Certificate Authority file to verify client certificate. string "ca.cert" No
websocketCertificate The certificate file that the websocket server should use when SSL is enabled. string "server.chain" No
websocketPrivateKey The private key file the websocket server should use when SSL is enabled. string "server.key" No

APL content cache parameters

The following table shows the parameters contained in the aplContentCache for caching APL content.

Parameter Description Type Default Required
contentCacheReusePeriodInSeconds The number of seconds to reuse a cached package. string "600" No
contentCacheMaxSize The maximum size for the cache of imported packages. string "50" No
maxNumberOfConcurrentDownloads The maximum number of concurrent package downloads to allow. string "5" No

AlexaPresentationCapabilityAgent parameters

The AlexaPresentationCapabilityAgent contains parameters for the Alexa Presentation Capability Agent (CA). These parameters handle configuration of state reporting for Alexa Presentation Language (APL) context RenderedDocumentState. When you use these parameters, the Alexa Presentation CA proactively reports states to the cloud even when there are no scheduled events. You disable this behavior when you don't set these parameters or when you set the state report check interval to 0.

The following example shows the AlexaPresentationCapabilityAgent parameters.


"alexaPresentationCapabilityAgent": {
    "minStateReportIntervalMs": {{NUMBER}},
    "stateReportCheckIntervalMs": {{NUMBER}},
    "video": {
        "codecs": [
            {{STRING}},
            ...
        ]
    }
}
 

The following table shows the alexaPresentationCapabilityAgent parameters.

Parameter Description Type Default Required
minStateReportIntervalMs The minimum state reporting interval in milliseconds for the Alexa Presentation CA. number 600 No
stateReportCheckIntervalMs The interval between checks for context changes. number 0 No
video.codecs A definition of the supported video codecs by the APL runtime on the device reported in Alexa.Presentation.APL.Video, which may differ from video codecs supported elsewhere on the device. Video Configuration Parameters specify supported values for codecs. array of strings [ "H_264_41", "H_264_42" ] No

Visual characteristics parameters

The visualCharacteristics contains configurations for device-reported visual characteristic capabilities. All configuration objects map explicitly to the capability's API configuration. The following table shows the visual characteristics parameters.

The following example shows visual characterstics parameters.


"visualCharacteristics": [
  {{Alexa.InteractionMode}},
  {{Alexa.Display.Window}},
  {{Alexa.Display}}
]
 

The following table shows the visual characterstic parameters.

Parameter Description Required
Alexa.Display A definition of the physical properties of two-dimensional video display devices, such as LCD displays, LED displays. Yes
Alexa.Display.Window A definition of the possible windows that might be created on this device's display. A display can contain multiple windows. Yes
Alexa.InteractionMode A definition of the ways that a user can interact with this device. Yes

Presentation options parameters

The presentationOptions contains configuration options for visual presentations managed by the SDK, such as timeouts corresponding to presentation lifespan.

The following example shows the presentation options parameters.


"presentationOptions": {
  "shortPresentationTimeoutMs": {{NUMBER}},
  "transientPresentationTimeoutMs": {{NUMBER}},
  "longPresentationTimeoutMs": {{NUMBER}}
}
 

The following table shows the presentation options parameters.

Parameter Description Type Default Required
shortPresentationTimeoutMs Timeout used for presentations with short lifespan unless you specify a custom timeout. number 30000 No
transientPresentationTimeoutMs Timeout used for presentations with transient lifespan unless you specify a custom timeout. number 10000 No
longPresentationTimeoutMs Timeout used for presentations with long lifespan unless you specify a custom timeout. number -1 No

Sample client config

The sampleClientConfig contains a pass-through configuration for the connected IPC client. It can contain any object definition required by your IPC client.

Refer to the IPC client configuration specification for all parameters.

The following property has no defined schema.

"sampleClientConfig": {
    ...
}