### Install project dependencies Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Run this command to install the necessary dependencies for the project. ```bash pnpm install ``` -------------------------------- ### Install @novastar/native via npm Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Use this command to install the package using npm. ```bash npm install --save @novastar/native@next ``` -------------------------------- ### Install @novastar/native via yarn Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Use this command to install the package using yarn. ```bash yarn add @novastar/native@next ``` -------------------------------- ### Install ilspycmd Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Run this command to install the ilspycmd package required for decompiling binary libraries. ```bash pnpm run ilspycmd:install ``` -------------------------------- ### Install @novastar/net via npm Source: https://sarakusha.github.io/novastar/modules/_novastar_net.html Install the package using npm. The package is tagged with @next. ```bash npm install --save @novastar/net@next ``` -------------------------------- ### Usage example for @novastar/net Source: https://sarakusha.github.io/novastar/modules/_novastar_net.html Shows how to find network devices, open a session, send a request, and release the session. ```javascript import { findNetDevices, net } from '@novastar/net'; const [address] = await findNetDevices(); if (address) { session = net.open(address); } const writeReq = new Request([255]); writeReq.deviceType = DeviceType.ReceivingCard; writeReq.address = 0x02000001; await session.connection.send(writeReq); // Close all network sessions net.release(); ``` -------------------------------- ### Load System Configuration with io-ts Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Example of using io-ts and fast-xml-parser to load and validate system configuration files. ```typescript import * as t from 'io-ts'; import { XMLParser, type X2jOptions } from 'fast-xml-parser'; import { isLeft } from 'fp-ts/Either'; import * as t from 'io-ts'; import { PathReporter } from 'io-ts/PathReporter'; import fs from 'fs'; import { SystemParameterConfig } from '@novastar/native/SystemParameterConfig'; const options: X2jOptions = { ignoreAttributes: false, parseTagValue: false, }; const parser = new XMLParser(options); /** Create a wrapper for the parser */ const makeCfgParser = (codec: C) => (data: Buffer): t.TypeOf => { const cfg = parser.parse(data); const { decode } = t.exact(t.type({ [codec.name]: codec })); const res = decode(cfg); if (isLeft(res)) { throw new TypeError(PathReporter.report(res)[0]); } return res.right[codec.name]; }; const systemParameterParser = makeCfgParser(SystemParameterConfig); /** * *.scfg * @param pathname */ export const loadSystemConfig = (pathname: string): SystemParameterConfig => { const data = fs.readFileSync(pathname); return systemParameterParser(data); }; ``` -------------------------------- ### Install @novastar/net via yarn Source: https://sarakusha.github.io/novastar/modules/_novastar_net.html Install the package using yarn. The package is tagged with @next. ```bash yarn add @novastar/net@next ``` -------------------------------- ### Install @novastar/serial with yarn Source: https://sarakusha.github.io/novastar/modules/_novastar_serial.html Install the @novastar/serial package using yarn. The package is tagged with 'next'. ```bash yarn add @novastar/serial@next ``` -------------------------------- ### Install @novastar/serial with npm Source: https://sarakusha.github.io/novastar/modules/_novastar_serial.html Install the @novastar/serial package using npm. The package is tagged with 'next'. ```bash npm install --save @novastar/serial@next ``` -------------------------------- ### Install @novastar/screen via yarn Source: https://sarakusha.github.io/novastar/modules/_novastar_screen.html Use this command to install the next version of the package using yarn. ```bash $ yarn add @novastar/screen@next ``` -------------------------------- ### Install @novastar/screen via npm Source: https://sarakusha.github.io/novastar/modules/_novastar_screen.html Use this command to install the latest version of the package using npm. ```bash $ npm install --save @novastar/screen@latest ``` -------------------------------- ### Usage of SessionAPI Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Example showing how to open a network session and call an imported API method. ```typescript import { net } from '@novastar/net'; import { SessionAPI } from './Session'; const session: SessionAPI = net.open('192.168.1.40'); await session.SetGamma(0, 0, 0, false, 2.6); ``` -------------------------------- ### Usage example for @novastar/serial Source: https://sarakusha.github.io/novastar/modules/_novastar_serial.html Shows how to find sending cards, open a serial session, send a request to a receiving card, and release all serial sessions. The search uses a VID/PID pair, initially for MCTRL300: ['10c4', 'ea60']. ```typescript import { Request } from '@novastar/codec'; import serial, { findSendingCards } from '@novastar/serial'; const [port] = await findSendingCards(); const session = await serial.open(port.path); const readReq = new Request(1); readReq.deviceType = DeviceType.ReceivingCard; readReq.address = 0x02000001; readReq.port = 0; const { data: [value] } = await session.connection.send(readReq); // Close all serial sessions serial.release(); ``` -------------------------------- ### Usage of ScreenConfigurator Source: https://sarakusha.github.io/novastar/modules/_novastar_screen.html Demonstrates how to initialize the ScreenConfigurator with a network or serial session and perform operations like reading signal status and managing brightness. ```javascript import ScreenConfigurator from '@novastar/screen'; // const ScreenConfigurator = require('@novastar/screen').default import { findNetDevices, net } from '@novastar/net'; import { findSendingCards, serial } from '@novastar/serial'; async function main() { // net const [address] = await findNetDevices(); if (!address) return; const session = net.open(address); // serial const [port] = await findSendingCards(); const session = await serial.open(port.path); const ctrl = new ScreenConfigurator(session); await ctrl.reload(); // Get input DVI signal status const hasDVISignalIn = await ctrl.ReadHasDVISignalIn(); // Request the brightness of the first receiving card on the screen. const firstCardBrightness = await ctrl.ReadFirstBrightness(); for await (let brightness of ctrl.ReadBrightness()) { // Request the brightness of all reseiving cards on the screen using a generator. } // Write the specified brightness value to all receiving cards. await ctrl.WriteBrightness(80); } ``` -------------------------------- ### Check development prerequisites Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Run this command to verify that the required environment prerequisites are met. ```bash pnpm run requirements ``` -------------------------------- ### default(addr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadSender_EnableSyncAndTotalData.default.html Reads the sender enable sync and total data from the specified address. Returns a Request object. ```APIDOC ## default(addr) ### Description Reads the sender enable sync and total data from the specified address. ### Method Function call ### Endpoint `default(addr)` ### Parameters - **addr** (number) - Required - The address of the sender. ### Returns - **Request** - The request object for the operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_Read9868ABlankOptimizationLevel2.default.html Reads the blank optimization level 2 from the specified device address, port address, and scan board address. Returns a Request object for further processing. ```APIDOC ## default(addr, portAddr, scanBoardAddr) ### Description Reads the blank optimization level 2 from the specified device address, port address, and scan board address. Returns a Request object for further processing. ### Method Function Call ### Endpoint `default(addr, portAddr, scanBoardAddr)` ### Parameters - **addr** (number) - Required - Device address. - **portAddr** (number) - Required - Port address. - **scanBoardAddr** (number) - Required - Scan board address. ### Returns - **Request** - A Request object representing the read operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadScanner_FPGAProgramLength.default.html Reads the FPGA program length from a scanner board. Accepts three numeric parameters and returns a Request object. ```APIDOC ## default(addr, portAddr, scanBoardAddr) ### Description Reads the FPGA program length from a scanner board. ### Method Function call ### Signature `default(addr: number, portAddr: number, scanBoardAddr: number): Request` ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. ### Returns - **Request** - The request object for the operation. ``` -------------------------------- ### default(addr): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadSender_VideoScalingMode.default.html Creates a request to read the video scaling mode from the specified sender address. ```APIDOC ## default(addr): Request ### Description Creates a request to read the video scaling mode from the specified sender address. ### Method Function call ### Endpoint `default(addr)` ### Parameters - **addr** (number) - Required - The address of the sender. ### Returns - **Request** - A request object representing the read operation. ``` -------------------------------- ### default(addr, dataLength): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadSender_EnableSmartBright.default.html Creates a request to read the sender's smart brightness enable status. The function takes an address and data length as parameters and returns a Request object. ```APIDOC ## default(addr, dataLength): Request ### Description Creates a request to read the sender's smart brightness enable status. This function is part of the @novastar/native API and returns a Request object for further processing. ### Method Function Call ### Endpoint ReadSender_EnableSmartBright.default ### Parameters - **addr** (number) - Required - The address of the sender device. - **dataLength** (number) - Required - The length of data to read. ### Returns - **Request** - A Request object representing the read operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadColorAdjustMatrixType.default.html Function signature and parameters for reading the color adjustment matrix type. ```APIDOC ## default(addr, portAddr, scanBoardAddr) ### Description Reads the color adjustment matrix type from a specified scan board. ### Parameters - **addr** (number) - The address of the device. - **portAddr** (number) - The port address. - **scanBoardAddr** (number) - The scan board address. ### Returns - **Request** - A request object representing the read operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadScanner_FPGAProgramRemarks.default.html Reads the FPGA program remarks from a specified scanning board. Accepts the device address, port address, and scan board address as numeric parameters, and returns a Request object representing the read operation. ```APIDOC ## default(addr, portAddr, scanBoardAddr): Request ### Description Reads the FPGA program remarks from a specified scanning board. ### Function Signature `default(addr: number, portAddr: number, scanBoardAddr: number): Request` ### Parameters - **addr** (number) - Required - The device address. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. ### Returns - **Request** - A Request object representing the read operation. ``` -------------------------------- ### default(addr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadSender_VideoMosaicData.default.html Creates a request to read sender video mosaic data from the specified address. ```APIDOC ## default(addr) ### Description Creates a request to read sender video mosaic data from the specified address. ### Method Function call ### Signature `default(addr): Request` ### Parameters - **addr** (number) - Required - The address of the sender device. ### Returns - **Request** - A request object for reading the video mosaic data. ``` -------------------------------- ### default(addr, portAddr, funcCardAddr): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_FuncCard_ReadTempInfoOfMonitorCard_1.default.html Creates a request to read temperature information from a monitor card. The function takes the address, port address, and function card address as parameters and returns a Request object. ```APIDOC ## default(addr, portAddr, funcCardAddr): Request ### Description Creates a request to read temperature information from a monitor card. ### Method Function Call ### Signature `default(addr: number, portAddr: number, funcCardAddr: number): Request` ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **funcCardAddr** (number) - Required - The function card address. ### Returns - **Request** - A request object for reading temperature information. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr, bBroadcast, parameterChromaOrBrightness) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_SetParameterCorrectCoefficientComponent.default.html Documentation for the default function that sets the parameter correction coefficient component. ```APIDOC ## default(addr, portAddr, scanBoardAddr, bBroadcast, parameterChromaOrBrightness) ### Description Sets the parameter correction coefficient component for a specified scan board. The function returns a Request object that can be used to send the command. ### Method Function Call ### Signature `default(addr: number, portAddr: number, scanBoardAddr: number, bBroadcast: Broadcast, parameterChromaOrBrightness: number): Request` ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. - **bBroadcast** (Broadcast) - Required - A boolean type parameter indicating whether to broadcast the command. - **parameterChromaOrBrightness** (number) - Required - The parameter for chroma or brightness correction coefficient. ### Type Parameters - **Broadcast** extends boolean - The type parameter for the broadcast flag. ### Returns - **Request** - A Request object that can be used to send the command. ``` -------------------------------- ### trySetSender_SoftwareSpace Source: https://sarakusha.github.io/novastar/classes/_novastar_screen.ScreenConfigurator.default.html Sets the sender's software space data. ```APIDOC ## trySetSender_SoftwareSpace ### Description Sets the sender's software space data. ### Method function ### Signature `trySetSender_SoftwareSpace(addr: number, sender_SoftwareSpace: Buffer | number[], dataLength: number, addrOffset: number): Promise` ### Parameters - **addr** (number) - Required - The address of the device. - **sender_SoftwareSpace** (Buffer | number[]) - Required - The software space data. - **dataLength** (number) - Required - The length of the data. - **addrOffset** (number) - Required - The address offset. ### Returns `Promise` - Resolves to `null` on success, or an `ErrorType` on failure. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr, bBroadcast, smartMode) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_SetSmartSetMode_1.default.html Function signature and parameters for setting the smart mode on a scan board. ```APIDOC ## default(addr, portAddr, scanBoardAddr, bBroadcast, smartMode): Request ### Description Sets the smart mode for a scan board. The function returns a Request object that can be used to execute the operation. ### Method Function Call ### Signature `default(addr: number, portAddr: number, scanBoardAddr: number, bBroadcast: Broadcast, smartMode: number): Request` ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. - **bBroadcast** (Broadcast) - Required - A boolean indicating whether to broadcast the command. - **smartMode** (number) - Required - The smart mode value to set. ### Returns - **Request** - A Request object that can be used to execute the operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadScanner18BitEnable.default.html Reads the 18-bit enable setting from a scan board using the provided addresses. ```APIDOC ## default(addr, portAddr, scanBoardAddr): Request ### Description Reads the 18-bit enable setting from a scan board. ### Method Function call ### Endpoint `default(addr, portAddr, scanBoardAddr)` ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. ### Returns - **Request** - A Request object representing the read operation. ``` -------------------------------- ### default(addr, index): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadPortWidth.default.html Reads the port width for the specified address and index. Returns a Request object representing the operation. ```APIDOC ## default(addr, index): Request ### Description Reads the port width for the specified address and index. ### Parameters - **addr** (number) - Required - The address of the device. - **index** (number) - Required - The index of the port. ### Returns - **Request** - A Request object representing the read operation. ``` -------------------------------- ### default(addr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadCommunicationProtocol.default.html Creates a request to read the communication protocol from a Novastar device at the specified address. ```APIDOC ## default(addr) ### Description Creates a request to read the communication protocol from a Novastar device at the specified address. ### Parameters - **addr** (number) - Required - The address of the device to read the communication protocol from. ### Returns - **Request** - A request object representing the read operation. ``` -------------------------------- ### trySetSender_ScreenConfigFlagSpace Source: https://sarakusha.github.io/novastar/classes/_novastar_screen.ScreenConfigurator.default.html Sets the sender's screen configuration flag space. ```APIDOC ## trySetSender_ScreenConfigFlagSpace ### Description Sets the sender's screen configuration flag space. ### Method function ### Signature `trySetSender_ScreenConfigFlagSpace(addr: number, screenConfig: Buffer | number[]): Promise` ### Parameters - **addr** (number) - Required - The address of the device. - **screenConfig** (Buffer | number[]) - Required - The screen configuration data. ### Returns `Promise` - Resolves to `null` on success, or an `ErrorType` on failure. ``` -------------------------------- ### default(addr, bBroadcast, funcCard_MCUDescription): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_FuncCard_SetFuncCardMCUDescription.default.html Sets the MCU description of a function card. The function takes an address, a broadcast flag, and the MCU description data, and returns a request object. ```APIDOC ## default(addr, bBroadcast, funcCard_MCUDescription): Request ### Description Sets the MCU description of a function card. ### Method Function call ### Signature `default(addr, bBroadcast, funcCard_MCUDescription): Request` ### Type Parameters - **Broadcast** extends boolean ### Parameters - **addr** (number) - Required - The address of the device. - **bBroadcast** (Broadcast) - Required - Broadcast flag. - **funcCard_MCUDescription** (number[] | Buffer) - Required - The MCU description data. ### Returns - **Request** - A request object. ``` -------------------------------- ### OneSmartBrightEasyConfig Interface Source: https://sarakusha.github.io/novastar/interfaces/_novastar_native.OneSmartBrightEasyConfig.OneSmartBrightEasyConfig.html The OneSmartBrightEasyConfig interface defines the properties for configuring smart brightness easy adjustment. It includes optional and required fields for brightness, color temperature, gamma, scheduling, and enable flags. ```APIDOC ## OneSmartBrightEasyConfig Interface ### Description The OneSmartBrightEasyConfig interface defines the configuration structure for smart brightness easy adjustment. It includes properties for brightness percentage, color temperature, gamma value, scheduling, and enable flags. ### Properties #### BrightPercent (Optional) - **Type**: number - **Description**: The brightness percentage value. #### ColorTempValue (Optional) - **Type**: string - **Description**: The color temperature value. #### CustomDayCollection (Required) - **Type**: string[] - **Description**: A collection of custom day strings. #### GammaValue (Optional) - **Type**: number - **Description**: The gamma value. #### IsColorTemp (Optional) - **Type**: boolean - **Description**: Indicates whether color temperature is enabled. #### IsConfigEnable (Required) - **Type**: boolean - **Description**: Indicates whether the configuration is enabled. #### IsEnableGamma (Optional) - **Type**: boolean - **Description**: Indicates whether gamma is enabled. #### IsHasAdjusted (Optional) - **Type**: boolean - **Description**: Indicates whether the configuration has been adjusted. #### ScheduleType (Optional) - **Type**: SmartBrightAdjustTypeEnum - **Description**: The schedule type for smart brightness adjustment. #### StartTime (Optional) - **Type**: Date - **Description**: The start time for the schedule. ``` -------------------------------- ### default(addr, bBroadcast, info): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_SetSender_ImageEnState.default.html Function signature and parameter documentation for setting the image enable state on a sender. ```APIDOC ## default(addr, bBroadcast, info): Request ### Description Sets the image enable state for a sender. The function takes an address, a broadcast flag, and an info value, and returns a request object. ### Method Function call ### Endpoint `default(addr, bBroadcast, info)` ### Parameters - **addr** (number) - Required - The address of the sender. - **bBroadcast** (Broadcast) - Required - A boolean flag indicating whether to broadcast the operation. - **info** (number) - Required - The image enable state value. ### Returns - **Request** - A request object that can be used to execute the operation. ``` -------------------------------- ### Import API methods in api.ts Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Create an api.ts file to selectively import the specific NovaStar native methods required for your application. ```typescript import '@novastar/native/api/ReadDviMode'; import '@novastar/native/api/ReadDviSelect'; import '@novastar/native/api/ReadGlobalBrightness'; import '@novastar/native/api/ReadIsHasDVI'; import '@novastar/native/api/ReadAllBrightnessInfo'; import '@novastar/native/api/ReadSelfTestMode'; import '@novastar/native/api/SetGlobalBrightness'; import '@novastar/native/api/SetSelfTestMode'; import '@novastar/native/api/SetGamma'; import '@novastar/native/api/ReadGamma'; import '@novastar/native/api/ReadScanner_McuProgramRemarks'; import '@novastar/native/api/ReadScanner_FPGAProgramRemarks'; ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadScanner_LowGrayCodeTable.default.html Reads the low gray code table from a scanner. Accepts three numeric parameters and returns a Request object. ```APIDOC ## Function: default(addr, portAddr, scanBoardAddr) ### Description Reads the low gray code table from a scanner. ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. ### Returns - **Request** - A Request object representing the operation. ``` -------------------------------- ### default(addr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadSender_HDRInfo.default.html Documentation for the default function that reads HDR information from a sender device. ```APIDOC ## default(addr): Request ### Description Creates a request to read HDR information from a sender device at the specified address. ### Method Function Call ### Endpoint `default(addr)` ### Parameters - **addr** (number) - Required - The address of the sender device. ### Returns - **Request** - A request object for reading HDR information. ``` -------------------------------- ### default(scr: LEDDisplayInfo) Source: https://sarakusha.github.io/novastar/functions/_novastar_screen.GetScreenSenderAddrInfo.default.html Retrieves sender address information for the specified LED display. ```APIDOC ## default(scr: LEDDisplayInfo) ### Description Retrieves the sender address information for a given LED display configuration. ### Parameters - **scr** (LEDDisplayInfo) - Required - The LED display information object. ### Returns - **Array** - An array of objects, each containing: - **LoadScannerCount** (number) - **SenderIndex** (number) ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr, bBroadcast, configFileID): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_SetConfigFileID.default.html Sets the configuration file ID on a specified scan board. The function accepts the address, port address, scan board address, a broadcast flag, and the configuration file ID, and returns a Request object. ```APIDOC ## default(addr, portAddr, scanBoardAddr, bBroadcast, configFileID): Request ### Description Sets the configuration file ID on a specified scan board. The function accepts the address, port address, scan board address, a broadcast flag, and the configuration file ID, and returns a Request object. ### Method Function call ### Signature `default(addr, portAddr, scanBoardAddr, bBroadcast, configFileID): Request` ### Type Parameters - **Broadcast** extends boolean ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. - **bBroadcast** (Broadcast) - Required - A boolean flag indicating whether to broadcast. - **configFileID** (number) - Required - The configuration file ID to set. ### Returns - **Request** - A Request object representing the operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadDehumidAdjustTime.default.html Reads the dehumidification adjustment time. Accepts three numeric parameters and returns a Request object. ```APIDOC ## Function default ### Description Reads the dehumidification adjustment time. ### Signature ```typescript default(addr: number, portAddr: number, scanBoardAddr: number): Request ``` ### Parameters - **addr** (number) - Required - Address parameter. - **portAddr** (number) - Required - Port address parameter. - **scanBoardAddr** (number) - Required - Scan board address parameter. ### Returns - **Request** - A Request object representing the read operation. ``` -------------------------------- ### default(addr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadSender_HLGModel.default.html Creates a request to read the HLG model from a sender device at the specified address. ```APIDOC ## default(addr): Request ### Description Creates a request to read the HLG model from a sender device at the specified address. ### Method Function Call ### Endpoint `default(addr)` ### Parameters - **addr** (number) - Required - The address of the sender device. ### Returns - **Request** - A request object representing the read operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr, bBroadcast): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_WriteScanerSlavaFlashToSdram.default.html Writes scanner slave flash to SDRAM. Accepts the device address, port address, scan board address, and a broadcast flag, returning a Request object. ```APIDOC ## default(addr, portAddr, scanBoardAddr, bBroadcast): Request ### Description Writes scanner slave flash to SDRAM. Accepts the device address, port address, scan board address, and a broadcast flag, returning a Request object. ### Method Function Call ### Signature `default(addr, portAddr, scanBoardAddr, bBroadcast): Request` ### Type Parameters - **Broadcast** extends boolean ### Parameters - **addr** (number) - Required - The device address. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. - **bBroadcast** (Broadcast) - Required - The broadcast flag. ### Returns - **Request** - The request object. ``` -------------------------------- ### default(addr): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadMasterOrSlaveNext.default.html Creates a request to read the master or slave next value from a Novastar device at the specified address. ```APIDOC ## default(addr): Request ### Description Creates a request to read the master or slave next value from a Novastar device at the specified address. ### Method N/A ### Endpoint N/A ### Parameters #### Parameters - **addr** (number) - Required - The address of the device to read from. ### Returns - **Request** - A request object representing the read operation. ### Request Example N/A ### Response N/A ### Response Example N/A ``` -------------------------------- ### default(addr, portAddr, distributeAddr): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_Distribute_ReadGoldenFPGAVersion.default.html Reads the golden FPGA version from a distribution device. The function requires the device address, port address, and distribution address as numeric parameters, and returns a Request object. ```APIDOC ## default(addr, portAddr, distributeAddr): Request ### Description Reads the golden FPGA version from a distribution device. ### Method Function Call ### Signature `default(addr: number, portAddr: number, distributeAddr: number): Request` ### Parameters - **addr** (number) - Required - The address of the device. - **portAddr** (number) - Required - The port address. - **distributeAddr** (number) - Required - The distribution address. ### Returns - **Request** - A Request object representing the operation. ``` -------------------------------- ### @novastar/serial API Source: https://sarakusha.github.io/novastar/modules/_novastar_serial.html This section provides API documentation for the @novastar/serial module, including functions for finding and managing sending cards, the serial binding class, and related types. ```APIDOC ## [FUNCTION] findSendingCards ### Description Finds connected sending cards by scanning known devices (VID/PID pairs). Returns an array of port paths for the found devices. ### Method FUNCTION ### Endpoint findSendingCards() ### Parameters None ### Returns - **Promise>** - A promise that resolves to an array of objects, each containing a `path` property representing the serial port path of a found sending card. ### Example ```javascript const [port] = await findSendingCards(); ``` ## [FUNCTION] addKnownDevice ### Description Adds a device to the list of known devices used for finding sending cards. This allows the user to extend the default VID/PID list. ### Method FUNCTION ### Endpoint addKnownDevice(device) ### Parameters - **device** (object) - Required - The device to add, containing `vid` and `pid` properties. ### Example ```javascript addKnownDevice({ vid: '10c4', pid: 'ea60' }); ``` ## [FUNCTION] clearKnownDevices ### Description Clears the list of known devices used for finding sending cards. ### Method FUNCTION ### Endpoint clearKnownDevices() ### Parameters None ### Example ```javascript clearKnownDevices(); ``` ## [FUNCTION] getKnownDevices ### Description Returns the current list of known devices used for finding sending cards. ### Method FUNCTION ### Endpoint getKnownDevices() ### Parameters None ### Returns - **Array<{vid: string, pid: string}>** - An array of known devices, each with `vid` and `pid` properties. ### Example ```javascript const devices = getKnownDevices(); ``` ## [FUNCTION] removeKnownDevice ### Description Removes a device from the list of known devices used for finding sending cards. ### Method FUNCTION ### Endpoint removeKnownDevice(device) ### Parameters - **device** (object) - Required - The device to remove, containing `vid` and `pid` properties. ### Example ```javascript removeKnownDevice({ vid: '10c4', pid: 'ea60' }); ``` ## [CLASS] SerialBinding ### Description Represents a serial binding that provides a session for communication with a sending card over a serial port. ### Method CLASS ### Endpoint SerialBinding ### Properties - **connection** (object) - The connection object used to send requests. ### Example ```javascript const session = await serial.open(port.path); const { data: [value] } = await session.connection.send(readReq); ``` ## [INTERFACE] SerialBindingEvents ### Description Defines events emitted by a SerialBinding instance. ### Method INTERFACE ### Endpoint SerialBindingEvents ### Events - **close** - Emitted when the serial connection is closed. - **error** - Emitted when an error occurs. ## [VARIABLE] serial ### Description The main serial binding object that provides methods to open sessions and manage known devices. ### Method VARIABLE ### Endpoint serial ### Properties - **open** (function) - Opens a serial session on a given port path. - **release** (function) - Closes all serial sessions. ### Example ```javascript const session = await serial.open(port.path); serial.release(); ``` ## [TYPE ALIAS] KnownDevice ### Description Represents a known device with a VID/PID pair. ### Method TYPE ALIAS ### Endpoint KnownDevice ### Properties - **vid** (string) - The vendor ID. - **pid** (string) - The product ID. ## [TYPE ALIAS] SerialSession ### Description Represents a serial session returned by `serial.open`. ### Method TYPE ALIAS ### Endpoint SerialSession ### Properties - **connection** (object) - The connection object used to send requests. ``` -------------------------------- ### default(addr) Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadIsSerdes.default.html Creates a request to read the SERDES status from the specified address. ```APIDOC ## default(addr) ### Description Creates a request to read the SERDES status from the specified address. ### Parameters - **addr** (number) - Required - The address of the device to read from. ### Returns - **Request** - A request object representing the read operation. ``` -------------------------------- ### trySetSender_DistributePortSeting Source: https://sarakusha.github.io/novastar/classes/_novastar_screen.ScreenConfigurator.default.html Sets the sender's distribute port settings. ```APIDOC ## trySetSender_DistributePortSeting ### Description Sets the sender's distribute port settings. ### Method function ### Signature `trySetSender_DistributePortSeting(addr: number, dataValue: Buffer | number[]): Promise` ### Parameters - **addr** (number) - Required - The address of the device. - **dataValue** (Buffer | number[]) - Required - The data value to set. ### Returns `Promise` - Resolves to `null` on success, or an `ErrorType` on failure. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr, bBroadcast, dviOffsetY): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_SetTVCardDVI0OffsetY.default.html Sets the DVI0 offset Y for a TV card on a specified scan board. The function takes the device address, port address, scan board address, a broadcast flag, and the offset value, returning a Request object. ```APIDOC ## default(addr, portAddr, scanBoardAddr, bBroadcast, dviOffsetY): Request ### Description Sets the DVI0 offset Y for a TV card on a specified scan board. The function takes the device address, port address, scan board address, a broadcast flag, and the offset value, returning a Request object. ### Method Function Call ### Signature `default(addr, portAddr, scanBoardAddr, bBroadcast, dviOffsetY): Request` ### Type Parameters - **Broadcast** (boolean) - Determines whether the operation is broadcast. ### Parameters - **addr** (number) - The address of the device. - **portAddr** (number) - The port address. - **scanBoardAddr** (number) - The scan board address. - **bBroadcast** (Broadcast) - Whether to broadcast the setting. - **dviOffsetY** (number) - The DVI0 offset Y value. ### Returns - **Request** - A request object representing the operation. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr, readLength): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadScanerBurningProgramPackage.default.html Creates a request to read the scanner burning program package. The function takes the address, port address, scan board address, and read length as parameters and returns a Request object. ```APIDOC ## default(addr, portAddr, scanBoardAddr, readLength): Request ### Description Creates a request to read the scanner burning program package. ### Method Function call ### Endpoint `default(addr, portAddr, scanBoardAddr, readLength)` ### Parameters - **addr** (number) - Required - The address. - **portAddr** (number) - Required - The port address. - **scanBoardAddr** (number) - Required - The scan board address. - **readLength** (number) - Required - The length of data to read. ### Returns - **Request** - The request object for reading the scanner burning program package. ``` -------------------------------- ### default(addr, portAddr, scanBoardAddr): Request Source: https://sarakusha.github.io/novastar/functions/_novastar_native.api_ReadModuelRows.default.html The ReadModuelRows function is a default export from the @novastar/native package. It accepts three numeric parameters and returns a Request object. ```APIDOC ## default(addr, portAddr, scanBoardAddr): Request ### Description ReadModuelRows is a function that takes three numeric parameters and returns a Request object. ### Method Function ### Signature `default(addr: number, portAddr: number, scanBoardAddr: number): Request` ### Parameters - **addr** (number) - Required - The address parameter. - **portAddr** (number) - Required - The port address parameter. - **scanBoardAddr** (number) - Required - The scan board address parameter. ### Returns - **Request** - The return value is a Request object. ``` -------------------------------- ### Generate TypeScript code Source: https://sarakusha.github.io/novastar/modules/_novastar_native.html Run this command to automatically generate TypeScript code from the decompiled binary libraries. ```bash pnpm run rebuild ``` -------------------------------- ### SubpixelLightPointLayoutEnum Source: https://sarakusha.github.io/novastar/enums/_novastar_native.SubpixelLightPointLayout.SubpixelLightPointLayoutEnum.html Enumeration of subpixel light point layout patterns. ```APIDOC ## SubpixelLightPointLayoutEnum ### Description Enumeration of subpixel light point layout patterns. ### Enumeration Members - **BGGR** - BGGR - **BGR** - BGR - **BRG** - BRG - **GBR** - GBR - **GBRG** - GBRG - **GRB** - GRB - **GRBG** - GRBG - **RBG** - RBG - **RGB** - RGB - **RGGB** - RGGB - **unknow** - unknow ```