UNPKG

@hello.nrfcloud.com/proto-map

Version:

Documents the communication protocol between devices, the hello.nrfcloud.com/map backend and web application

14 lines 709 B
import type { LwM2MObjectInstance } from "../LwM2MObjectInstance.js"; import { NumberResource, TimeResource, OptionalResource, validateInstance } from "../validation.js"; import type { NetworkNeighbor_14502 } from "../objects.js"; import { LwM2MObjectID } from "../LwM2MObjectID.js"; /** * Validate Network Neighbor (14502) * * Ensures the given object is an LwM2M object according to the schema 14502.xml. */ export const validate14502 = (o: unknown): { error: Error; } | { object: LwM2MObjectInstance<NetworkNeighbor_14502>; } => validateInstance<NetworkNeighbor_14502>(LwM2MObjectID.NetworkNeighbor_14502, "1.0", { 0: NumberResource, 99: TimeResource, 1: OptionalResource(NumberResource) })(o);