@signageos/front-applet 7.1.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +5 -5
- package/dist/bundle.js.map +1 -1
- package/docs/fpath/index.md +316 -0
- package/docs/index.md +18 -85
- package/docs/sos/browser.md +210 -0
- package/docs/sos/command.md +68 -0
- package/docs/sos/debug.md +25 -0
- package/docs/sos/deviceInfo.md +49 -0
- package/docs/sos/display.md +21 -0
- package/docs/sos/fileSystem.md +594 -0
- package/docs/sos/hardware/barcodeScanner.md +40 -0
- package/docs/sos/hardware/index.md +64 -0
- package/docs/sos/hardware/led.md +14 -0
- package/docs/sos/index.md +82 -0
- package/docs/sos/input.md +73 -0
- package/docs/sos/monitors.md +21 -0
- package/docs/sos/native/index.md +5 -0
- package/docs/sos/native/mdc.md +240 -0
- package/docs/sos/offline/cache.md +183 -0
- package/docs/sos/offline/index.md +188 -0
- package/docs/sos/osd.md +13 -0
- package/docs/sos/proofOfPlay.md +37 -0
- package/docs/sos/stream.md +960 -0
- package/docs/sos/sync.md +298 -0
- package/docs/sos/video.md +285 -0
- package/docs/sos_management/app.md +102 -0
- package/docs/sos_management/audio.md +29 -0
- package/docs/sos_management/debug.md +33 -0
- package/docs/sos_management/firmware.md +86 -0
- package/docs/sos_management/index.md +212 -0
- package/docs/sos_management/network.md +197 -0
- package/docs/sos_management/os.md +54 -0
- package/docs/sos_management/package.md +33 -0
- package/docs/sos_management/power.md +136 -0
- package/docs/sos_management/proxy.md +41 -0
- package/docs/sos_management/remoteControl.md +72 -0
- package/docs/sos_management/screen.md +198 -0
- package/docs/sos_management/security.md +47 -0
- package/docs/sos_management/time.md +101 -0
- package/docs/sos_management/wifi.md +366 -0
- package/es6/FrontApplet/Browser/Browser.d.ts +61 -8
- package/es6/FrontApplet/Browser/Browser.js +92 -40
- package/es6/FrontApplet/Browser/Browser.js.map +1 -1
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +2 -2
- package/es6/FrontApplet/Browser/events.d.ts +1 -1
- package/es6/FrontApplet/Browser/events.js +2 -2
- package/es6/FrontApplet/Browser/events.js.map +1 -1
- package/es6/FrontApplet/Browser/messages.d.ts +2 -2
- package/es6/FrontApplet/Command/Command.d.ts +37 -3
- package/es6/FrontApplet/Command/Command.js +52 -23
- package/es6/FrontApplet/Command/Command.js.map +1 -1
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -2
- package/es6/FrontApplet/Connect/Connect.d.ts +19 -0
- package/es6/FrontApplet/Connect/Connect.js +162 -0
- package/es6/FrontApplet/Connect/Connect.js.map +1 -0
- package/es6/FrontApplet/Connect/IConnectMessage.d.ts +4 -0
- package/es6/FrontApplet/{Stream/streamListeners.js → Connect/IConnectMessage.js} +1 -1
- package/es6/FrontApplet/Connect/IConnectMessage.js.map +1 -0
- package/es6/FrontApplet/Debug/Debug.d.ts +15 -1
- package/es6/FrontApplet/Debug/Debug.js +28 -18
- package/es6/FrontApplet/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Debug/debugDecorator.d.ts +3 -3
- package/es6/FrontApplet/Debug/debugDecorator.js +15 -9
- package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +23 -0
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +36 -27
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js +1 -2
- package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
- package/es6/FrontApplet/Display/Display.d.ts +25 -3
- package/es6/FrontApplet/Display/Display.js +35 -19
- package/es6/FrontApplet/Display/Display.js.map +1 -1
- package/es6/FrontApplet/Display/IDisplay.d.ts +3 -1
- package/es6/FrontApplet/Error/AppletCommandError.js +12 -3
- package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletError.js +10 -2
- package/es6/FrontApplet/Error/AppletError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletHardwareError.js +12 -3
- package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -2
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletResourcesError.js +12 -3
- package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletSecurityError.js +12 -3
- package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletStreamError.js +10 -2
- package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -1
- package/es6/FrontApplet/Error/AppletVideoError.js +12 -3
- package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -1
- package/es6/FrontApplet/Error/ErrorCodesMessages.js +4 -1
- package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -1
- package/es6/FrontApplet/Error/ErrorSuggestions.js +1 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -1
- package/es6/FrontApplet/Error/FileNotFoundError.js +10 -2
- package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -1
- package/es6/FrontApplet/Error/SosError.js +5 -1
- package/es6/FrontApplet/Error/SosError.js.map +1 -1
- package/es6/FrontApplet/Error/errorHelper.js +5 -6
- package/es6/FrontApplet/Error/errorHelper.js.map +1 -1
- package/es6/FrontApplet/Exchange/Exchange.js +7 -14
- package/es6/FrontApplet/Exchange/Exchange.js.map +1 -1
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +156 -1
- package/es6/FrontApplet/FileSystem/FileSystem.js +318 -195
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +2 -0
- package/es6/FrontApplet/{Input/IKeyUpEventListener.js → FileSystem/HashAlgorithm.js} +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.js.map +1 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -1
- package/es6/FrontApplet/FrontApplet.d.ts +57 -4
- package/es6/FrontApplet/FrontApplet.js +129 -49
- package/es6/FrontApplet/FrontApplet.js.map +1 -1
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +2 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +35 -54
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
- package/es6/FrontApplet/Hardware/Hardware.d.ts +16 -2
- package/es6/FrontApplet/Hardware/Hardware.js +31 -19
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
- package/es6/FrontApplet/Hardware/IHardware.d.ts +2 -2
- package/es6/FrontApplet/Hardware/ISerialPort.d.ts +16 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js +1 -1
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -1
- package/es6/FrontApplet/Hardware/Led/Led.d.ts +8 -0
- package/es6/FrontApplet/Hardware/Led/Led.js +22 -20
- package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -1
- package/es6/FrontApplet/Hardware/SerialPort.d.ts +1 -1
- package/es6/FrontApplet/Hardware/SerialPort.js +15 -23
- package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -1
- package/es6/FrontApplet/Hash/generator.js +2 -3
- package/es6/FrontApplet/Hash/generator.js.map +1 -1
- package/es6/FrontApplet/Iframe/Iframe.d.ts +9 -8
- package/es6/FrontApplet/Iframe/Iframe.js +10 -0
- package/es6/FrontApplet/Iframe/Iframe.js.map +1 -1
- package/es6/FrontApplet/Input/IInput.d.ts +1 -2
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +32 -2
- package/es6/FrontApplet/Input/IKeyUpEvent.js +32 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
- package/es6/FrontApplet/Input/Input.d.ts +19 -3
- package/es6/FrontApplet/Input/Input.js +44 -23
- package/es6/FrontApplet/Input/Input.js.map +1 -1
- package/es6/FrontApplet/Management/App/App.d.ts +48 -10
- package/es6/FrontApplet/Management/App/App.js +45 -30
- package/es6/FrontApplet/Management/App/App.js.map +1 -1
- package/es6/FrontApplet/Management/App/IApp.d.ts +3 -1
- package/es6/FrontApplet/Management/Audio/Audio.d.ts +16 -0
- package/es6/FrontApplet/Management/Audio/Audio.js +30 -22
- package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +4 -0
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +15 -22
- package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.d.ts +1 -1
- package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js +5 -2
- package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Debug/Debug.d.ts +19 -0
- package/es6/FrontApplet/Management/Debug/Debug.js +37 -30
- package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +37 -10
- package/es6/FrontApplet/Management/Firmware/Firmware.js +34 -30
- package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
- package/es6/FrontApplet/Management/Firmware/IFirmware.d.ts +1 -2
- package/es6/FrontApplet/Management/IManagement.d.ts +3 -1
- package/es6/FrontApplet/Management/Management.d.ts +106 -15
- package/es6/FrontApplet/Management/Management.js +191 -113
- package/es6/FrontApplet/Management/Management.js.map +1 -1
- package/es6/FrontApplet/Management/Network/INetworkInfo.d.ts +2 -2
- package/es6/FrontApplet/Management/Network/Network.d.ts +56 -8
- package/es6/FrontApplet/Management/Network/Network.js +86 -68
- package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
- package/es6/FrontApplet/Management/OS/OS.d.ts +20 -0
- package/es6/FrontApplet/Management/OS/OS.js +34 -27
- package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
- package/es6/FrontApplet/Management/Package/Package.d.ts +20 -0
- package/es6/FrontApplet/Management/Package/Package.js +37 -22
- package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
- package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.d.ts +1 -1
- package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js +5 -2
- package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.d.ts +4 -0
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js +15 -22
- package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js.map +1 -1
- package/es6/FrontApplet/Management/Power/Power.d.ts +64 -0
- package/es6/FrontApplet/Management/Power/Power.js +160 -115
- package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
- package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +21 -0
- package/es6/FrontApplet/Management/Proxy/Proxy.js +41 -35
- package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +43 -0
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +63 -39
- package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
- package/es6/FrontApplet/Management/Screen/IOrientation.d.ts +1 -1
- package/es6/FrontApplet/Management/Screen/Screen.d.ts +127 -0
- package/es6/FrontApplet/Management/Screen/Screen.js +197 -89
- package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
- package/es6/FrontApplet/Management/Security/Security.d.ts +20 -5
- package/es6/FrontApplet/Management/Security/Security.js +33 -31
- package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
- package/es6/FrontApplet/Management/Time/Time.d.ts +31 -5
- package/es6/FrontApplet/Management/Time/Time.js +49 -40
- package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.d.ts +19 -1
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.js +19 -1
- package/es6/FrontApplet/Management/Wifi/IWifiEvent.js.map +1 -1
- package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +108 -7
- package/es6/FrontApplet/Management/Wifi/Wifi.js +162 -86
- package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js +2 -2
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/ProprietaryTimerHelper.d.ts +1 -1
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js +8 -6
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +2 -2
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -3
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -1
- package/es6/FrontApplet/Management/helpers/VideoHelper.js +1 -1
- package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -1
- package/es6/FrontApplet/Monitors/Monitors.d.ts +9 -0
- package/es6/FrontApplet/Monitors/Monitors.js +16 -16
- package/es6/FrontApplet/Monitors/Monitors.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +52 -3
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +79 -38
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/NativeCommands.d.ts +4 -0
- package/es6/FrontApplet/NativeCommands/NativeCommands.js +12 -2
- package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
- package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
- package/es6/FrontApplet/OSD/OSD.js +15 -15
- package/es6/FrontApplet/OSD/OSD.js.map +1 -1
- package/es6/FrontApplet/Offline/Cache/Cache.d.ts +91 -2
- package/es6/FrontApplet/Offline/Cache/Cache.js +193 -131
- package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +1 -1
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +18 -26
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
- package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +5 -5
- package/es6/FrontApplet/Offline/IAddFont.d.ts +3 -1
- package/es6/FrontApplet/Offline/IAddFont.js.map +1 -1
- package/es6/FrontApplet/Offline/IFileType.d.ts +1 -1
- package/es6/FrontApplet/Offline/ISaveFile.js +5 -2
- package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -1
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +2 -1
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -1
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +2 -1
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -1
- package/es6/FrontApplet/Offline/Offline.d.ts +79 -8
- package/es6/FrontApplet/Offline/Offline.js +119 -59
- package/es6/FrontApplet/Offline/Offline.js.map +1 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +19 -1
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +41 -29
- package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
- package/es6/FrontApplet/Sensors/Proximity.d.ts +4 -3
- package/es6/FrontApplet/Sensors/Proximity.js +13 -5
- package/es6/FrontApplet/Sensors/Proximity.js.map +1 -1
- package/es6/FrontApplet/Sensors/Sensors.d.ts +3 -1
- package/es6/FrontApplet/Sensors/Sensors.js +9 -2
- package/es6/FrontApplet/Sensors/Sensors.js.map +1 -1
- package/es6/FrontApplet/Stream/IStream.d.ts +10 -10
- package/es6/FrontApplet/Stream/IStreamMessage.d.ts +1 -1
- package/es6/FrontApplet/Stream/IStreamTrackInfo.d.ts +2 -2
- package/es6/FrontApplet/Stream/Stream.d.ts +130 -15
- package/es6/FrontApplet/Stream/Stream.js +262 -163
- package/es6/FrontApplet/Stream/Stream.js.map +1 -1
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -1
- package/es6/FrontApplet/Stream/streamEvents.d.ts +1 -1
- package/es6/FrontApplet/Sync/Sync.d.ts +152 -6
- package/es6/FrontApplet/Sync/Sync.js +199 -115
- package/es6/FrontApplet/Sync/Sync.js.map +1 -1
- package/es6/FrontApplet/Sync/syncEvents.d.ts +3 -1
- package/es6/FrontApplet/Sync/syncMessages.js +1 -1
- package/es6/FrontApplet/Sync/syncMessages.js.map +1 -1
- package/es6/FrontApplet/Timing/Timing.d.ts +1 -0
- package/es6/FrontApplet/Timing/Timing.js +9 -2
- package/es6/FrontApplet/Timing/Timing.js.map +1 -1
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +1 -1
- package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +9 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js +16 -18
- package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -1
- package/es6/FrontApplet/Touch/Touch.d.ts +3 -0
- package/es6/FrontApplet/Touch/Touch.js +13 -3
- package/es6/FrontApplet/Touch/Touch.js.map +1 -1
- package/es6/FrontApplet/Validate/Validate.d.ts +5 -5
- package/es6/FrontApplet/Validate/Validate.js +27 -24
- package/es6/FrontApplet/Validate/Validate.js.map +1 -1
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js +7 -2
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -1
- package/es6/FrontApplet/Video/IOptions.d.ts +8 -1
- package/es6/FrontApplet/Video/IVideo.d.ts +8 -8
- package/es6/FrontApplet/Video/IVideoEvent.d.ts +1 -1
- package/es6/FrontApplet/Video/IVideoEvent.js +3 -3
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -1
- package/es6/FrontApplet/Video/IVideoMessage.d.ts +1 -1
- package/es6/FrontApplet/Video/Video.d.ts +84 -12
- package/es6/FrontApplet/Video/Video.js +196 -137
- package/es6/FrontApplet/Video/Video.js.map +1 -1
- package/es6/FrontApplet/createFrontApplet.js +5 -2
- package/es6/FrontApplet/createFrontApplet.js.map +1 -1
- package/es6/Monitoring/Console/consoleCommands.d.ts +1 -1
- package/es6/Monitoring/Display/displayCommands.d.ts +1 -1
- package/es6/Monitoring/Display/handleDisplayRequests.d.ts +2 -2
- package/es6/Monitoring/Display/handleDisplayRequests.js +5 -15
- package/es6/Monitoring/Display/handleDisplayRequests.js.map +1 -1
- package/es6/Monitoring/EmptyObject.d.ts +1 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +10 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js +3 -1
- package/es6/Monitoring/FileSystem/fileSystemCommands.js.map +1 -1
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.d.ts +2 -2
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +41 -45
- package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.d.ts +2 -2
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js +4 -14
- package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js.map +1 -1
- package/es6/Monitoring/Management/App/applicationCommands.d.ts +1 -1
- package/es6/Monitoring/Management/App/handleApplicationRequests.d.ts +2 -2
- package/es6/Monitoring/Management/App/handleApplicationRequests.js +9 -19
- package/es6/Monitoring/Management/App/handleApplicationRequests.js.map +1 -1
- package/es6/Monitoring/Management/Audio/audioCommands.d.ts +1 -1
- package/es6/Monitoring/Management/Audio/handleAudioRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Audio/handleAudioRequests.js +7 -17
- package/es6/Monitoring/Management/Audio/handleAudioRequests.js.map +1 -1
- package/es6/Monitoring/Management/AutoRecovery/autoRecoveryCommands.d.ts +1 -1
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.d.ts +2 -2
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js +7 -17
- package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js.map +1 -1
- package/es6/Monitoring/Management/Debug/debugCommands.d.ts +1 -1
- package/es6/Monitoring/Management/Debug/handleDebugRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Debug/handleDebugRequests.js +9 -19
- package/es6/Monitoring/Management/Debug/handleDebugRequests.js.map +1 -1
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js +11 -21
- package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js.map +1 -1
- package/es6/Monitoring/Management/Network/managementNetworkCommands.d.ts +1 -1
- package/es6/Monitoring/Management/Os/managementOsRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Os/managementOsRequests.js +9 -19
- package/es6/Monitoring/Management/Os/managementOsRequests.js.map +1 -1
- package/es6/Monitoring/Management/Os/osCommands.d.ts +1 -1
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.d.ts +2 -2
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js +7 -17
- package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js.map +1 -1
- package/es6/Monitoring/Management/PeerRecovery/peerRecoveryCommands.d.ts +1 -1
- package/es6/Monitoring/Management/Power/handlePowerRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Power/handlePowerRequests.js +19 -29
- package/es6/Monitoring/Management/Power/handlePowerRequests.js.map +1 -1
- package/es6/Monitoring/Management/Power/powerCommands.d.ts +1 -1
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.d.ts +2 -2
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js +15 -25
- package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js.map +1 -1
- package/es6/Monitoring/Management/RemoteControl/remoteControlCommands.d.ts +1 -1
- package/es6/Monitoring/Management/Screen/handleScreenRequests.d.ts +2 -2
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js +19 -29
- package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
- package/es6/Monitoring/Management/Screen/screenCommands.d.ts +1 -1
- package/es6/Monitoring/Management/Security/handleSecurityCommands.d.ts +2 -2
- package/es6/Monitoring/Management/Security/handleSecurityCommands.js +9 -19
- package/es6/Monitoring/Management/Security/handleSecurityCommands.js.map +1 -1
- package/es6/Monitoring/Management/Security/securityCommands.d.ts +1 -1
- package/es6/Monitoring/Management/Time/handleTimeCommands.d.ts +2 -2
- package/es6/Monitoring/Management/Time/handleTimeCommands.js +9 -19
- package/es6/Monitoring/Management/Time/handleTimeCommands.js.map +1 -1
- package/es6/Monitoring/Management/Time/timeCommands.d.ts +1 -1
- package/es6/Monitoring/Management/handleManagementRequests.d.ts +2 -2
- package/es6/Monitoring/Management/handleManagementRequests.js +23 -33
- package/es6/Monitoring/Management/handleManagementRequests.js.map +1 -1
- package/es6/Monitoring/Management/managementCommands.d.ts +1 -1
- package/es6/Monitoring/{Montoring.d.ts → Monitoring.d.ts} +1 -0
- package/es6/Monitoring/Monitoring.js +83 -0
- package/es6/Monitoring/Monitoring.js.map +1 -0
- package/es6/Monitoring/NativeCommands/handleNativeCommands.d.ts +2 -2
- package/es6/Monitoring/NativeCommands/handleNativeCommands.js +5 -15
- package/es6/Monitoring/NativeCommands/handleNativeCommands.js.map +1 -1
- package/es6/Monitoring/NativeCommands/nativeMdcCommands.d.ts +1 -1
- package/es6/Monitoring/OSD/handleOsdRequests.d.ts +2 -2
- package/es6/Monitoring/OSD/handleOsdRequests.js +5 -15
- package/es6/Monitoring/OSD/handleOsdRequests.js.map +1 -1
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.d.ts +2 -2
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js +23 -33
- package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js.map +1 -1
- package/es6/Monitoring/Video/handleVideoRequests.d.ts +2 -2
- package/es6/Monitoring/Video/handleVideoRequests.js +36 -9
- package/es6/Monitoring/Video/handleVideoRequests.js.map +1 -1
- package/es6/Monitoring/handleMonitoringRequests.d.ts +2 -2
- package/es6/Monitoring/handleMonitoringRequests.js +6 -16
- package/es6/Monitoring/handleMonitoringRequests.js.map +1 -1
- package/es6/Monitoring/monitoringCommands.d.ts +1 -1
- package/es6/Sensors/IButton.js +1 -1
- package/es6/Sensors/IButton.js.map +1 -1
- package/es6/Sensors/IRfidAntenna.d.ts +1 -1
- package/es6/Sensors/IRfidAntenna.js +1 -1
- package/es6/Sensors/IRfidAntenna.js.map +1 -1
- package/es6/Util/Console/enhancer.d.ts +11 -0
- package/es6/Util/Console/enhancer.js +23 -0
- package/es6/Util/Console/enhancer.js.map +1 -0
- package/es6/bundle.d.ts +1 -1
- package/es6/bundle.js +12 -5
- package/es6/bundle.js.map +1 -1
- package/es6/fpath.d.ts +1 -1
- package/es6/fpath.js +34 -1
- package/es6/fpath.js.map +1 -1
- package/es6/utils/types.d.ts +1 -0
- package/es6/{FrontApplet/Video/IVideoEventListener.js → utils/types.js} +1 -1
- package/es6/utils/types.js.map +1 -0
- package/package.json +28 -26
- package/CHANGELOG.md +0 -480
- package/docs/applet-basics.md +0 -272
- package/docs/content/js-applet-resources.md +0 -154
- package/docs/content/js-browser.md +0 -163
- package/docs/content/js-command.md +0 -154
- package/docs/content/js-debug.md +0 -36
- package/docs/content/js-device-info.md +0 -56
- package/docs/content/js-display.md +0 -56
- package/docs/content/js-file-system.md +0 -670
- package/docs/content/js-fonts.md +0 -115
- package/docs/content/js-hardware.md +0 -55
- package/docs/content/js-iframes.md +0 -66
- package/docs/content/js-input.md +0 -71
- package/docs/content/js-offline-cache-media-files.md +0 -257
- package/docs/content/js-offline-cache-simple-data.md +0 -129
- package/docs/content/js-osd.md +0 -32
- package/docs/content/js-proof-of-play.md +0 -60
- package/docs/content/js-sensors.md +0 -70
- package/docs/content/js-serial.md +0 -165
- package/docs/content/js-sync-playback.md +0 -384
- package/docs/content/js-video-inputs-internal-ports.md +0 -131
- package/docs/content/js-video-stream.md +0 -618
- package/docs/content/js-video.md +0 -232
- package/docs/management/js-management-application.md +0 -107
- package/docs/management/js-management-audio.md +0 -44
- package/docs/management/js-management-debug.md +0 -40
- package/docs/management/js-management-firmware.md +0 -93
- package/docs/management/js-management-management.md +0 -178
- package/docs/management/js-management-monitoring-commands.md +0 -107
- package/docs/management/js-management-monitors.md +0 -55
- package/docs/management/js-management-native-commands-mdc.md +0 -90
- package/docs/management/js-management-network.md +0 -223
- package/docs/management/js-management-os.md +0 -62
- package/docs/management/js-management-package.md +0 -48
- package/docs/management/js-management-power.md +0 -175
- package/docs/management/js-management-proxy.md +0 -81
- package/docs/management/js-management-remote-control.md +0 -58
- package/docs/management/js-management-screen.md +0 -225
- package/docs/management/js-management-security.md +0 -71
- package/docs/management/js-management-time.md +0 -161
- package/docs/management/js-management-wifi.md +0 -341
- package/es6/FrontApplet/Command/ICommandEventListener.d.ts +0 -6
- package/es6/FrontApplet/Command/ICommandEventListener.js +0 -3
- package/es6/FrontApplet/Command/ICommandEventListener.js.map +0 -1
- package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +0 -5
- package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +0 -1
- package/es6/FrontApplet/Management/Firmware/FirmwareType.d.ts +0 -4
- package/es6/FrontApplet/Management/Firmware/FirmwareType.js +0 -9
- package/es6/FrontApplet/Management/Firmware/FirmwareType.js.map +0 -1
- package/es6/FrontApplet/Stream/streamListeners.d.ts +0 -10
- package/es6/FrontApplet/Stream/streamListeners.js.map +0 -1
- package/es6/FrontApplet/Video/IVideoEventListener.d.ts +0 -5
- package/es6/FrontApplet/Video/IVideoEventListener.js.map +0 -1
- package/es6/Monitoring/Montoring.js +0 -131
- package/es6/Monitoring/Montoring.js.map +0 -1
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Offline Cache for storing data
|
|
3
|
-
author: Miroslav Behina
|
|
4
|
-
date: 22.11.2018
|
|
5
|
-
type: js-api
|
|
6
|
-
tags:
|
|
7
|
-
- applet
|
|
8
|
-
- applet_api
|
|
9
|
-
- api
|
|
10
|
-
- js_api
|
|
11
|
-
description: "[Content JS API] This API provides you with approach similar to the HTML5's Local Storage, but implemented internally via native device API and completely device agnostic."
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Offline Cache for storing simple data
|
|
15
|
-
|
|
16
|
-
Use when you need to save some data into local memory.
|
|
17
|
-
This API provides you with approach similar to the HTML5's Local Storage, but implemented internally via native device API and completely device agnostic.
|
|
18
|
-
We do not recommend using a different storage type then Offline Cache or full featured [File System API](js-file-system) that will provide you with more low-level methods.
|
|
19
|
-
|
|
20
|
-
## All methods
|
|
21
|
-
|
|
22
|
-
| Method | Description | Supported Since |
|
|
23
|
-
| ------ | -------- | :--------: |
|
|
24
|
-
| `loadContent()` | Loads content from internal storage | 1.0.3 |
|
|
25
|
-
| `saveContent()` | Saves content to internal storage | 1.0.3 |
|
|
26
|
-
| `listContents()` | List all content items saved previously to internal storage | 2.0.0 |
|
|
27
|
-
| `deleteContent()` | Delete content item previously saved to internal storage | 2.0.0 |
|
|
28
|
-
|
|
29
|
-
:::warning
|
|
30
|
-
Emulator has certain limitations while handling offline files. [Read more here](https://docs.signageos.io/hc/en-us/articles/4405238997138)
|
|
31
|
-
:::
|
|
32
|
-
|
|
33
|
-
## loadContent()
|
|
34
|
-
Method `loadContent()` loads content from internal storage.
|
|
35
|
-
|
|
36
|
-
### Parameters
|
|
37
|
-
|
|
38
|
-
| Param | Type | Required | Description |
|
|
39
|
-
| -------------- | ------ | :-------: | ----------- |
|
|
40
|
-
| `uid` | string | <div class="red">Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters |
|
|
41
|
-
|
|
42
|
-
### Javascript example
|
|
43
|
-
```javascript
|
|
44
|
-
await sos.offline.cache.saveContent('ApplicationSecret', '123SuperSecretHash');
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## saveContent()
|
|
48
|
-
Method for saving content into internal storage.
|
|
49
|
-
|
|
50
|
-
### Parameters
|
|
51
|
-
|
|
52
|
-
| Param | Type | Required | Description |
|
|
53
|
-
| -------------- | ------ | :-------: | ----------- |
|
|
54
|
-
| `uid` | string | <div class="red">Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters |
|
|
55
|
-
| `content` | string | <div class="red">Yes</div> | Only string variables enabled. For JSON values use `JSON.Stringify()`
|
|
56
|
-
|
|
57
|
-
### Javascript Example
|
|
58
|
-
```javascript
|
|
59
|
-
sos.offline.cache.saveContent('ApplicationSecret', '123SuperSecretHash')
|
|
60
|
-
.then(() => {
|
|
61
|
-
//Content was successfully saved, retrieve it.
|
|
62
|
-
return sos.offline.cache.loadContent('ApplicationSecret');
|
|
63
|
-
})
|
|
64
|
-
.then((content) => {
|
|
65
|
-
console.log('Loaded', content); // print 123SuperSecretHash
|
|
66
|
-
})
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## listContents()
|
|
70
|
-
List all content items saved previously to internal storage
|
|
71
|
-
|
|
72
|
-
### Javascript example
|
|
73
|
-
```javascript
|
|
74
|
-
await sos.offline.cache.listContents();
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## deleteContent()
|
|
78
|
-
Delete content item previously saved to internal storage.
|
|
79
|
-
|
|
80
|
-
### Parameters
|
|
81
|
-
|
|
82
|
-
| Param | Type | Required | Description |
|
|
83
|
-
| -------------- | ------ | :-------: | ----------- |
|
|
84
|
-
| `uid` | string | <div class="red">Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters |
|
|
85
|
-
|
|
86
|
-
### Javascript example
|
|
87
|
-
```javascript
|
|
88
|
-
//Store
|
|
89
|
-
sos.offline.cache.saveContent('ApplicationSecret', '123SuperSecretHash')
|
|
90
|
-
.then(() => {
|
|
91
|
-
//Content was successfully saved, retrieve it.
|
|
92
|
-
return sos.offline.cache.loadContent('ApplicationSecret');
|
|
93
|
-
})
|
|
94
|
-
.then((content) => {
|
|
95
|
-
console.log('Loaded', content); // print 123SuperSecretHash
|
|
96
|
-
|
|
97
|
-
// Let's delete the content now
|
|
98
|
-
return sos.offline.cache.deleteContent('ApplicationSecret')
|
|
99
|
-
})
|
|
100
|
-
.then(() => {
|
|
101
|
-
console.log("Deleted");
|
|
102
|
-
})
|
|
103
|
-
.catch((error) => { console.error(error); });
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Usage with Typescript
|
|
107
|
-
You can also use all these methods with [signageOS TypeScript](https://docs.signageos.io/hc/en-us/articles/4405069154962#signageos-typescript).
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
loadContent(uid: string): Promise<string>;
|
|
111
|
-
saveContent(uid: string, content: string): Promise<void>;
|
|
112
|
-
|
|
113
|
-
listContents(): Promise<string[]>;
|
|
114
|
-
deleteContent(uid: string): Promise<void>;
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Errors
|
|
118
|
-
Although we are doing our best, following errors may occur when working with the offline cache.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
| Code | Type | Message |
|
|
122
|
-
| ---- | ---- | ------- |
|
|
123
|
-
| 41001 | AppletNativeCacheError | Already saving the file with UID: ```uid``` |
|
|
124
|
-
| 51001 | InternalNativeCacheError | Couldn't not read the files from the offline cache. |
|
|
125
|
-
| 51001 | InternalNativeCacheError | Couldn\'t load the file from offline cache. |
|
|
126
|
-
| 51001 | InternalNativeCacheError | Couldn\'t load the file before deleting it. |
|
|
127
|
-
| 51002 | InternalNativeCacheError | Couldn\'t save the file to the offline cache. |
|
|
128
|
-
| 51003 | InternalNativeCacheError | File wasn\'t deleted correctly. |
|
|
129
|
-
| 40901 | AppletOfflineCacheError | Uid contains invalid characters, allowed: $$ALLOWED_CHARS$$, got $$ACTUAL_UID$$
|
package/docs/content/js-osd.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: OSD
|
|
3
|
-
author: Patrik Bily
|
|
4
|
-
date: 24.10.2022
|
|
5
|
-
type: js-api
|
|
6
|
-
tags:
|
|
7
|
-
- applet
|
|
8
|
-
- applet_api
|
|
9
|
-
- api
|
|
10
|
-
- osd
|
|
11
|
-
- js_api
|
|
12
|
-
description: "[Content JS API] OSD API allows you to open OSD."
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# OSD
|
|
16
|
-
|
|
17
|
-
OSD API allows you to open OSD for initial setup with applet.
|
|
18
|
-
|
|
19
|
-
## All methods
|
|
20
|
-
|
|
21
|
-
| Method | Description | Supported since |
|
|
22
|
-
| ------------------ | ---------------------- | :-------------: |
|
|
23
|
-
| `showOSD()` |Open OSD on the display | 5.5.0 |
|
|
24
|
-
|
|
25
|
-
## showOSD()
|
|
26
|
-
|
|
27
|
-
This method allow you to open OSD through the JS API without typing the pin.
|
|
28
|
-
|
|
29
|
-
### Javascript example
|
|
30
|
-
```javascript
|
|
31
|
-
await sos.osd.showOSD();
|
|
32
|
-
```
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Proof of Play
|
|
3
|
-
author: Robert Pecha
|
|
4
|
-
date: 31.01.2023
|
|
5
|
-
type: js-api
|
|
6
|
-
tags:
|
|
7
|
-
- applet
|
|
8
|
-
- applet_api
|
|
9
|
-
- api
|
|
10
|
-
- js_api
|
|
11
|
-
description: "[Content JS API] You can use our Prooof of Play mechanism to log that some content was played on end device successfully or not. Our system includes important metadata about applet and device out-of-box to simplify solution of issues with content. You can use SignageOS to analyze, if, where, when and how long proposed content was playing in front of audience."
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## All methods
|
|
15
|
-
|
|
16
|
-
| Methods | Description | Supported since |
|
|
17
|
-
| ----------- | ------------ | -----------|
|
|
18
|
-
| `recordItemPlayed()` | Log that content was played successfully | 5.5.1 |
|
|
19
|
-
|
|
20
|
-
## recordItemPlayed()
|
|
21
|
-
|
|
22
|
-
Send provided information about played content along with additional metadata about current applet and device to SignageOS.
|
|
23
|
-
|
|
24
|
-
### Parameters
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| Param | Type | Required | Description |
|
|
28
|
-
| --------- | ------ | :------------------------: | -------------------------------------------------- |
|
|
29
|
-
| `options` | Object | <div class="red">Yes</div> | Object containing information about played content
|
|
30
|
-
|
|
31
|
-
### Options
|
|
32
|
-
|
|
33
|
-
Here is the options object defined as Typescript interface:
|
|
34
|
-
|
|
35
|
-
```typescript
|
|
36
|
-
interface IRecordItemOptions {
|
|
37
|
-
name: string;
|
|
38
|
-
customId?: string;
|
|
39
|
-
type?: 'video' | 'image' | 'html' | 'custom';
|
|
40
|
-
tags?: string[];
|
|
41
|
-
fileName?: string;
|
|
42
|
-
playbackSuccess?: boolean;
|
|
43
|
-
errorMessage?: string;
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Javascript example
|
|
48
|
-
```javascript
|
|
49
|
-
|
|
50
|
-
await sos.proofOfPlay.recordItemPlayed({
|
|
51
|
-
name: 'tesla-commercial-ad-christmas-campaign',
|
|
52
|
-
customId: 'dBE43bFB3312VFfvd34bgGHJVV334cd2',
|
|
53
|
-
type: 'video',
|
|
54
|
-
tags: ['tesla', 'christmas'],
|
|
55
|
-
fileName: 'tesla.mp4',
|
|
56
|
-
playbackSuccess: false,
|
|
57
|
-
errorMessage: 'Unsupported framerate 60fps',
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
```
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Sensors
|
|
3
|
-
author: Michal Artazov
|
|
4
|
-
date: 28.9.2020
|
|
5
|
-
type: js-api
|
|
6
|
-
tags:
|
|
7
|
-
- applet
|
|
8
|
-
- applet_api
|
|
9
|
-
- api
|
|
10
|
-
- js_api
|
|
11
|
-
- sensors
|
|
12
|
-
description: "[Content JS API] We don't directly provide any sensors API but we provide a set of tools to implement your own integration of the hardware that you want to use."
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Sensors
|
|
16
|
-
|
|
17
|
-
We don't directly provide any sensors API but we provide a set of tools to implement your own integration of
|
|
18
|
-
the hardware that you want to use.
|
|
19
|
-
|
|
20
|
-
## Sensors interfaces
|
|
21
|
-
|
|
22
|
-
We provide a set of interfaces, that any integration should implement.
|
|
23
|
-
If every implementation implements the same set of interfaces, it's easy to swap it for a different implementation.
|
|
24
|
-
It also requires less code to be written to use various types of hardware.
|
|
25
|
-
If possible, you should always implement these interfaces.
|
|
26
|
-
|
|
27
|
-
:::info
|
|
28
|
-
Right now, the list of interfaces is very short. We will be adding more types soon.
|
|
29
|
-
If there's any particular type of interfaces you'd like, kindly let us know.
|
|
30
|
-
:::
|
|
31
|
-
|
|
32
|
-
### Button
|
|
33
|
-
|
|
34
|
-
A regular button, that can be pressed or released.
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
interface IButton {
|
|
38
|
-
isPressed(): Promise<boolean>;
|
|
39
|
-
on(event: 'pressed' | 'released', listener: () => void): void;
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### RFID Antenna
|
|
44
|
-
|
|
45
|
-
Antenna that detects presence of RFID tags. An RFID tag is simply a number.
|
|
46
|
-
Whenever a tag is placed at close proximity to the antenna, it will emit a `placed` event.
|
|
47
|
-
Whenever a tag is picked and is no longer detected by the antenna, it will emit a `picked` event.
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
interface IRfidAntenna {
|
|
51
|
-
getPlacedTags(): Promise<number[]>;
|
|
52
|
-
on(event: 'picked' | 'placed', listener: (rfidTag: number) => void): void;
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Ready to use integrations
|
|
57
|
-
|
|
58
|
-
We already did the hard work for you and implemented some of the popular hardware. All you have to do is use it in your project.
|
|
59
|
-
For more information read [this article](https://docs.signageos.io/hc/en-us/articles/4405231196946-Supported-devices-for-Sensors-usage).
|
|
60
|
-
|
|
61
|
-
## Writing your own implementation
|
|
62
|
-
|
|
63
|
-
Sometimes you might want to use hardware that we don't support out of the box yet.
|
|
64
|
-
|
|
65
|
-
Firstly, you will need to read the documentation for the [serial API](js-serial).
|
|
66
|
-
Most often, the hardware you will decide to use connects to the device via USB and internally uses a serial communication, like RS232.
|
|
67
|
-
In that case you will use the serial API.
|
|
68
|
-
|
|
69
|
-
You can approach this any way you like, but remember that you should always implement the [interfaces defined by us](js-sensors#sensors-interfaces).
|
|
70
|
-
That will allow for greater code reusability and readability.
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Serial Port
|
|
3
|
-
author: Michal Artazov
|
|
4
|
-
date: 25.9.2020
|
|
5
|
-
type: js-api
|
|
6
|
-
tags:
|
|
7
|
-
- applet
|
|
8
|
-
- applet_api
|
|
9
|
-
- api
|
|
10
|
-
- serial
|
|
11
|
-
- js_api
|
|
12
|
-
description: "[Content JS API] Some platforms support connecting hardware via serial port, either directly via UART or via USB. This can be leveraged to integrate a wide variety of hardware into your digital signage application."
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Serial
|
|
16
|
-
|
|
17
|
-
Some platforms support connecting hardware via serial port, either directly via UART or via USB.
|
|
18
|
-
This can be leveraged to integrate a wide variety of hardware into your digital signage application.
|
|
19
|
-
|
|
20
|
-
Such hardware could be, for example, printers, payment terminals or sensors.
|
|
21
|
-
|
|
22
|
-
:::warning
|
|
23
|
-
* Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
|
|
24
|
-
* More info [**HERE**](js-display#supports).
|
|
25
|
-
* Samsung Kiosk serial connection only works over serial ports, not over USB ports
|
|
26
|
-
:::
|
|
27
|
-
|
|
28
|
-
## All methods
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
| Method | Description | Supported since |
|
|
32
|
-
| ------------------ | ---------------------- | :-------------: |
|
|
33
|
-
| `openSerialPort()` | Open a new serial port | 4.4.0
|
|
34
|
-
|
|
35
|
-
## openSerialPort()
|
|
36
|
-
|
|
37
|
-
Creates a new instance of serial port. You can then use that instance to handle the communication.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| Param | Type | Required | Description |
|
|
41
|
-
| --------- | ------ | :------------------------: | -------------------------------------------------- |
|
|
42
|
-
| `options` | Object | <div class="red">Yes</div> | Object containing configuration of the serial port
|
|
43
|
-
|
|
44
|
-
### Options
|
|
45
|
-
|
|
46
|
-
| Property | Type | Required | Description |
|
|
47
|
-
| -------- | ------ | -------- | -------- |
|
|
48
|
-
| `device` | String | No | Specifies the device address |
|
|
49
|
-
| `baudRate` | Number | Yes | Specifies the data transmission speed in bits per second |
|
|
50
|
-
| `parity` | **none**, **even**, **mark** or **space** | No | Specifies the form of error checking, whether (or what) extra bits are added to a byte |
|
|
51
|
-
| `databits` | Number | No | Specifies the number of bits in a byte |
|
|
52
|
-
| `stopbits` | Number | No | Specifies the number of bits used to signal the end of a communication packet |
|
|
53
|
-
| `rtscts` | Boolean | No | Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign |
|
|
54
|
-
:::
|
|
55
|
-
|
|
56
|
-
Here is the options object defined as Typescript interface:
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
interface ISerialPortOptions {
|
|
60
|
-
device?: string;
|
|
61
|
-
baudRate: number;
|
|
62
|
-
parity?: 'none' | 'even' | 'mark' | 'odd' | 'space';
|
|
63
|
-
databits?: number;
|
|
64
|
-
stopbits?: number;
|
|
65
|
-
rtscts?: boolean;
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Javascript example
|
|
70
|
-
```javascript
|
|
71
|
-
// Open default serial port based platform
|
|
72
|
-
const serialPort = await sos.hardware.openSerialPort({
|
|
73
|
-
baudRate: 115200,
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// Open specific serial port
|
|
77
|
-
const serialPort = await sos.hardware.openSerialPort({
|
|
78
|
-
device: '/dev/ttyUSB0',
|
|
79
|
-
baudRate: 115200,
|
|
80
|
-
});
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
:::info
|
|
84
|
-
Device address is different per platform (at least for now). Kindly find the respective device address:
|
|
85
|
-
|
|
86
|
-
| Device type | Default value | Other values for `device` |
|
|
87
|
-
| ----------- | ---------- | ----------------- |
|
|
88
|
-
| RaspberryPi / Linux | `/dev/ttyUSB0` | `/dev/ttyUSB0` |
|
|
89
|
-
| Windows | `COM3` | `COM3` (typically, but check your Win machine if this does not work) |
|
|
90
|
-
| Samsung Kiosk | `PORT1` |`PORT1`, `PORT2`, `PORT3` |
|
|
91
|
-
| Android | `/dev/ttyusb0` | `/dev/ttyusb0` |
|
|
92
|
-
| BrightSign | `0` | `0` (Serial jack /dev/ttyS0), `1` (GPIO port /dev/ttyS1), `USB:A/0` (USB-to-serial /dev/ttyUSB0) |
|
|
93
|
-
|
|
94
|
-
## Serial port methods
|
|
95
|
-
|
|
96
|
-
Once you create a serial port instance using `openSerialPort()` method listed above,
|
|
97
|
-
you can call following methods on it.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| Method | Description | Supported since |
|
|
101
|
-
| ---------- | ----------------------------------------------------------- | :-------------: |
|
|
102
|
-
| `onData()` | Call a listener callback anytime the opened serial port receiving data. | 4.4.0 |
|
|
103
|
-
| `write()` | Write data to the serial port | 4.4.0 |
|
|
104
|
-
| `close()` | Close serial port | 4.4.0
|
|
105
|
-
|
|
106
|
-
## onData()
|
|
107
|
-
|
|
108
|
-
Call a listener callback anytime the opened serial port receiving data.
|
|
109
|
-
The listener will stop if the serial port is closed.
|
|
110
|
-
|
|
111
|
-
Since data may be either text or binary, it's emitted as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)
|
|
112
|
-
and should be processed further according to the requirements of your application.
|
|
113
|
-
|
|
114
|
-
### Javascript example
|
|
115
|
-
In case of binary data:
|
|
116
|
-
```javascript
|
|
117
|
-
// serial port instance previously created via sos.hardware.openSerialPort()
|
|
118
|
-
serialPort.onData((data) => {
|
|
119
|
-
// data is array of numbers so can be processed as binary
|
|
120
|
-
});
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
In case of text data:
|
|
124
|
-
```javascript
|
|
125
|
-
// serial port instance previously created via sos.hardware.openSerialPort()
|
|
126
|
-
serialPort.onData((data) => {
|
|
127
|
-
const dataString = [...data].map((char) => String.fromCharCode(char)).join('');
|
|
128
|
-
});
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## write()
|
|
132
|
-
|
|
133
|
-
Write data to the serial port. The data can be a string of hexadecimal digits, array of numbers or [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array). And converted to hexadecimals
|
|
134
|
-
|
|
135
|
-
### Javascript example
|
|
136
|
-
```javascript
|
|
137
|
-
// serial port instance previously created via sos.hardware.openSerialPort()
|
|
138
|
-
await serialPort.write('68656c6c6f'); // hexadecimal string
|
|
139
|
-
await serialPort.write([ 10, 20, 30, 40 ]); // array of numbers
|
|
140
|
-
await serialPort.write(Uint8Array.from([ 10, 20, 30, 40 ])); // Uint8Array
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## close()
|
|
144
|
-
|
|
145
|
-
Close serial port and prevent any more communication
|
|
146
|
-
|
|
147
|
-
### Javascript example
|
|
148
|
-
```javascript
|
|
149
|
-
// serial port instance previously created via sos.hardware.openSerialPort()
|
|
150
|
-
await serialPort.close();
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## Errors
|
|
154
|
-
|
|
155
|
-
Following errors may occur when working with the serial ports. However they don't reflect on actual physical connectivity of the ports due to Samsung b2bapi does not register these events.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
| Code | Type | Message |
|
|
160
|
-
| ----- | --------------------- | ----------------------------------------- |
|
|
161
|
-
| 50602 | InternalHardwareError | Failed to open serial port |
|
|
162
|
-
| 50603 | InternalHardwareError | Closing serial port that isn't open |
|
|
163
|
-
| 50603 | InternalHardwareError | Failed to close serial port |
|
|
164
|
-
| 50604 | InternalHardwareError | Writing to a serial port that isn't open |
|
|
165
|
-
| 50604 | InternalHardwareError | Failed to write to serial port
|