Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
HMI Documentation
SetDisplayLayout

SetDisplayLayout

Type
Function
Sender
SDL
Purpose
Set the display template for the specified application's persistent display.

Request

Parameters

Name Type Mandatory Additional
displayLayout String true maxlength: 500
appID Integer true
dayColorScheme Common.TemplateColorScheme false
nightColorScheme Common.TemplateColorScheme false

Response

Parameters

Name Type Mandatory Additional
displayCapabilities Common.DisplayCapabilities false
buttonCapabilities Common.ButtonCapabilities false array: true
minsize: 1
maxsize: 100
softButtonCapabilities Common.SoftButtonCapabilities false array: true
minsize: 1
maxsize: 100
presetBankCapabilities Common.PresetBankCapabilities false

Sequence Diagrams

JSON Message Examples

Example Request

{
  "id" : 47,
  "jsonrpc" : "2.0",
  "method" : "UI.SetDisplayLayout",
  "params" :
  {
    "displayLayout" : "NON-MEDIA",
    "appID" : 65638
  }
}

Example Response

{
    "jsonrpc":"2.0",
    "id":42,
    "result":{
        "code":0,
        "method":"UI.SetDisplayLayout",
        "displayCapabilities":{
            "displayType":"GEN2_8_DMA",
            "displayName":"SDL_HMI",
            "textFields":[
                {
                    "name":"mainField1",
                    "characterSet":"UTF_8",
                    "width":500,
                    "rows":1
                },
                ...
                {
                    "name":"mediaClock",
                    "characterSet":"UTF_8",
                    "width":500,
                    "rows":1
                },
                {
                    "name":"mediaTrack",
                    "characterSet":"UTF_8",
                    "width":500,
                    "rows":1
                },
                {
                    "name":"templateTitle",
                    "characterSet":"UTF_8",
                    "width":100,
                    "rows":1
                },
                {
                    "name":"alertText1",
                    "characterSet":"UTF_8",
                    "width":500,
                    "rows":1
                },
                ...
            ],
            "imageFields":[
                {
                    "name":"softButtonImage",
                    "imageTypeSupported":[
                        "GRAPHIC_BMP",
                        "GRAPHIC_JPEG",
                        "GRAPHIC_PNG"
                    ],
                    "imageResolution":{
                        "resolutionWidth":64,
                        "resolutionHeight":64
                    }
                },
                {
                    "name":"choiceImage",
                    "imageTypeSupported":[
                        "GRAPHIC_BMP",
                        "GRAPHIC_JPEG",
                        "GRAPHIC_PNG"
                    ],
                    "imageResolution":{
                        "resolutionWidth":64,
                        "resolutionHeight":64
                    }
                },
                ...
            ],
            "mediaClockFormats":[
                "CLOCK1",
                "CLOCK2",
                "CLOCK3",
                "CLOCKTEXT1",
                "CLOCKTEXT2",
                "CLOCKTEXT3",
                "CLOCKTEXT4"
            ],
            "graphicSupported":true,
            "imageCapabilities":[
                "DYNAMIC",
                "STATIC"
            ],
            "templatesAvailable":[
                "MEDIA",
                "NON-MEDIA",
                "NAV_FULLSCREEN_MAP",
                "WEB_VIEW"
            ],
            "screenParams":{
                "resolution":{
                    "resolutionWidth":800,
                    "resolutionHeight":480
                },
                "touchEventAvailable":{
                    "pressAvailable":true,
                    "multiTouchAvailable":true,
                    "doublePressAvailable":false
                }
            },
            "numCustomPresetsAvailable":8
        },
        "buttonCapabilities":[
            ...
            {
                "name":"OK",
                "shortPressAvailable":true,
                "longPressAvailable":true,
                "upDownAvailable":true
            },
            {
                "name":"SEEKLEFT",
                "shortPressAvailable":true,
                "longPressAvailable":true,
                "upDownAvailable":true
            },
            {
                "name":"SEEKRIGHT",
                "shortPressAvailable":true,
                "longPressAvailable":true,
                "upDownAvailable":true
            },
            {
                "name":"TUNEUP",
                "shortPressAvailable":true,
                "longPressAvailable":true,
                "upDownAvailable":true
            },
            {
                "name":"TUNEDOWN",
                "shortPressAvailable":true,
                "longPressAvailable":true,
                "upDownAvailable":true
            }
        ],
        "softButtonCapabilities":[
            {
                "shortPressAvailable":true,
                "longPressAvailable":true,
                "upDownAvailable":true,
                "imageSupported":true
            }
        ],
        "presetBankCapabilities":{
            "onScreenPresetsAvailable":true
        }
    }
}

Example Error

{
  "id" : 47,
  "jsonrpc" : "2.0",
  "error" :
  {
    "code" : 6,
    "message" : "Ignored as the requested template is already associated with the named appID",
    "data" :
    {
      "method" : "UI.SetDisplayLayout"
    }
  }
}
View on GitHub.com
Previous Section Next Section