node-opcua-json 0.50.0 → 2.182.2
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/LICENSE +22 -0
- package/README.md +168 -4
- package/dist/104/index.d.ts +56 -0
- package/dist/104/index.js +93 -0
- package/dist/104/index.js.map +1 -0
- package/dist/105/index.d.ts +55 -0
- package/dist/105/index.js +95 -0
- package/dist/105/index.js.map +1 -0
- package/dist/decode_opcua_json.d.ts +31 -0
- package/dist/decode_opcua_json.js +61 -0
- package/dist/decode_opcua_json.js.map +1 -0
- package/dist/extension_object_constructor.d.ts +46 -0
- package/dist/extension_object_constructor.js +26 -0
- package/dist/extension_object_constructor.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/json_basic_encoding_body_functor.d.ts +34 -0
- package/dist/json_basic_encoding_body_functor.js +170 -0
- package/dist/json_basic_encoding_body_functor.js.map +1 -0
- package/dist/json_basic_encoding_decoding_byte_string.d.ts +27 -0
- package/dist/json_basic_encoding_decoding_byte_string.js +27 -0
- package/dist/json_basic_encoding_decoding_byte_string.js.map +1 -0
- package/dist/json_basic_encoding_decoding_data_value.d.ts +81 -0
- package/dist/json_basic_encoding_decoding_data_value.js +290 -0
- package/dist/json_basic_encoding_decoding_data_value.js.map +1 -0
- package/dist/json_basic_encoding_decoding_date_time.d.ts +26 -0
- package/dist/json_basic_encoding_decoding_date_time.js +43 -0
- package/dist/json_basic_encoding_decoding_date_time.js.map +1 -0
- package/dist/json_basic_encoding_decoding_extension_object.d.ts +65 -0
- package/dist/json_basic_encoding_decoding_extension_object.js +461 -0
- package/dist/json_basic_encoding_decoding_extension_object.js.map +1 -0
- package/dist/json_basic_encoding_decoding_int64.d.ts +30 -0
- package/dist/json_basic_encoding_decoding_int64.js +56 -0
- package/dist/json_basic_encoding_decoding_int64.js.map +1 -0
- package/dist/json_basic_encoding_decoding_localizedtext.d.ts +33 -0
- package/dist/json_basic_encoding_decoding_localizedtext.js +62 -0
- package/dist/json_basic_encoding_decoding_localizedtext.js.map +1 -0
- package/dist/json_basic_encoding_decoding_nodeid.d.ts +73 -0
- package/dist/json_basic_encoding_decoding_nodeid.js +314 -0
- package/dist/json_basic_encoding_decoding_nodeid.js.map +1 -0
- package/dist/json_basic_encoding_decoding_qualifiedname.d.ts +35 -0
- package/dist/json_basic_encoding_decoding_qualifiedname.js +126 -0
- package/dist/json_basic_encoding_decoding_qualifiedname.js.map +1 -0
- package/dist/json_basic_encoding_decoding_statuscode.d.ts +39 -0
- package/dist/json_basic_encoding_decoding_statuscode.js +139 -0
- package/dist/json_basic_encoding_decoding_statuscode.js.map +1 -0
- package/dist/json_basic_encoding_decoding_variant.d.ts +101 -0
- package/dist/json_basic_encoding_decoding_variant.js +234 -0
- package/dist/json_basic_encoding_decoding_variant.js.map +1 -0
- package/dist/json_encoding_scheme.d.ts +50 -0
- package/dist/json_encoding_scheme.js +117 -0
- package/dist/json_encoding_scheme.js.map +1 -0
- package/package.json +90 -35
- package/source/104/index.ts +117 -0
- package/source/105/index.ts +118 -0
- package/source/decode_opcua_json.ts +67 -0
- package/source/extension_object_constructor.ts +48 -0
- package/source/index.ts +71 -0
- package/source/json_basic_encoding_body_functor.ts +190 -0
- package/source/json_basic_encoding_decoding_byte_string.ts +52 -0
- package/source/json_basic_encoding_decoding_data_value.ts +392 -0
- package/source/json_basic_encoding_decoding_date_time.ts +42 -0
- package/source/json_basic_encoding_decoding_extension_object.ts +531 -0
- package/source/json_basic_encoding_decoding_int64.ts +74 -0
- package/source/json_basic_encoding_decoding_localizedtext.ts +69 -0
- package/source/json_basic_encoding_decoding_nodeid.ts +375 -0
- package/source/json_basic_encoding_decoding_qualifiedname.ts +144 -0
- package/source/json_basic_encoding_decoding_statuscode.ts +151 -0
- package/source/json_basic_encoding_decoding_variant.ts +339 -0
- package/source/json_encoding_scheme.ts +114 -0
- package/LICENSE.md +0 -40
- package/dist2/decode_opcua_json.d.ts +0 -12
- package/dist2/index.d.ts +0 -17
- package/dist2/index.js +0 -1
- package/dist2/json_basic_encoding_body_functor.d.ts +0 -14
- package/dist2/json_basic_encoding_decoding_byte_string.d.ts +0 -8
- package/dist2/json_basic_encoding_decoding_data_value.d.ts +0 -26
- package/dist2/json_basic_encoding_decoding_date_time.d.ts +0 -6
- package/dist2/json_basic_encoding_decoding_extension_object.d.ts +0 -32
- package/dist2/json_basic_encoding_decoding_int64.d.ts +0 -9
- package/dist2/json_basic_encoding_decoding_localizedtext.d.ts +0 -14
- package/dist2/json_basic_encoding_decoding_nodeid.d.ts +0 -33
- package/dist2/json_basic_encoding_decoding_qualifiedname.d.ts +0 -14
- package/dist2/json_basic_encoding_decoding_statuscode.d.ts +0 -16
- package/dist2/json_basic_encoding_decoding_variant.d.ts +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ExtensionObject } from "node-opcua-extension-object";
|
|
2
|
-
import { IStructuredTypeSchema } from "node-opcua-factory";
|
|
3
|
-
import { ExtensionObjectBuilder } from "./json_basic_encoding_body_functor";
|
|
4
|
-
import { NodeIdJSON } from "./json_basic_encoding_decoding_nodeid";
|
|
5
|
-
import { Pojo } from "./decode_opcua_json";
|
|
6
|
-
export interface ExtensionObjectJSON {
|
|
7
|
-
TypeId: NodeIdJSON;
|
|
8
|
-
Body: Pojo;
|
|
9
|
-
}
|
|
10
|
-
export declare function makeBody(extensionObject: ExtensionObject, reversible?: boolean): Pojo;
|
|
11
|
-
export declare function opcuaJsonDecodeExtensionObjectBody(schema: IStructuredTypeSchema, body: Pojo, builder?: ExtensionObjectBuilder): Pojo;
|
|
12
|
-
export declare function opcuaJsonEncodeExtensionObjectBody(extensionObject: ExtensionObject | null, reversible?: boolean, namespaceArray?: string[]): ExtensionObjectJSON | Pojo | null;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* ExtensionObject values shall be encoded as a JSON object with the fields shown:
|
|
16
|
-
*
|
|
17
|
-
* JSON Object - Definition for a ExtensionObject
|
|
18
|
-
* Name Description
|
|
19
|
-
* TypeId The NodeId of a DataTypeEncoding Node formatted using the rules in 5.4.2.10.
|
|
20
|
-
* Encoding The format of the Body field encoded as a JSON number.
|
|
21
|
-
* This value is 0 if the body is Structure encoded as a JSON object (see 5.4.6).
|
|
22
|
-
* This value is 1 if the body is a ByteString value encoded as a JSON string (see 5.4.2.8).
|
|
23
|
-
* This value is 2 if the body is a XmlElement value encoded as a JSON string (see 5.4.2.9).
|
|
24
|
-
* This field is omitted if the value is 0.
|
|
25
|
-
* Body Body of the ExtensionObject. The type of this field is specified by the Encoding field.
|
|
26
|
-
* If the Body is empty, the ExtensionObject is NULL and is omitted or encoded as a JSON null.
|
|
27
|
-
*
|
|
28
|
-
* For the non-reversible form, ExtensionObject values shall be encoded as a JSON object containing only
|
|
29
|
-
* the value of the Body field. The TypeId and Encoding fields are dropped.
|
|
30
|
-
*/
|
|
31
|
-
export declare function opcuaJsonEncodeExtensionObject(extensionObject: ExtensionObject | null, reversible?: boolean, namespaceArray?: string[]): ExtensionObjectJSON | Pojo | null;
|
|
32
|
-
export declare function opcuaJsonDecodeExtensionObject(_pojo: ExtensionObjectJSON, builder?: ExtensionObjectBuilder): ExtensionObject | null;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Sterfive 2020-2023
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { Int64, UInt64 } from "node-opcua-basic-types";
|
|
6
|
-
export declare function opcuaJsonEncodeInt64(value: Int64, reversible?: boolean): string;
|
|
7
|
-
export declare function opcuaJsonEncodeUInt64(value: UInt64, reversible?: boolean): string;
|
|
8
|
-
export declare function opcuaJsonDecodeInt64(value: string): Int64;
|
|
9
|
-
export declare function opcuaJsonDecodeUInt64(value: string): Int64;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Sterfive 2020-2023
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { LocalizedText } from "node-opcua-data-model";
|
|
6
|
-
interface LocalizedTextJSON {
|
|
7
|
-
/** The Text portion of LocalizedText values shall be encoded as a JSON string. */
|
|
8
|
-
Text: string | null;
|
|
9
|
-
/** The Locale portion of LocalizedText values shall be encoded as a JSON string */
|
|
10
|
-
Locale?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function opcuaJsonEncodeLocalizedText(localizedText: LocalizedText | null, reversible?: boolean, namespaceArray?: string[]): LocalizedTextJSON | string | null;
|
|
13
|
-
export declare function opcuaJsonDecodeLocalizedText(pojo: null | undefined | string | LocalizedTextJSON): LocalizedText;
|
|
14
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Sterfive 2020-2023
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
6
|
-
export interface NodeIdJSON {
|
|
7
|
-
IdType?: 0 | 1 | 2 | 3;
|
|
8
|
-
Id: number | string;
|
|
9
|
-
Namespace?: number | string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* IdType The IdentifierType encoded as a JSON number.
|
|
14
|
-
* Allowed values are:
|
|
15
|
-
* 0 - UInt32 Identifier encoded as a JSON number.
|
|
16
|
-
* 1 - A String Identifier encoded as a JSON string.
|
|
17
|
-
* 2 - A Guid Identifier.
|
|
18
|
-
* 3 - A ByteString Identifier
|
|
19
|
-
*
|
|
20
|
-
* This field is omitted for UInt32 identifiers.
|
|
21
|
-
*
|
|
22
|
-
* Id The Identifier.
|
|
23
|
-
* The value of the id field specifies the encoding of this field.
|
|
24
|
-
*
|
|
25
|
-
* Namespace The NamespaceIndex for the NodeId.
|
|
26
|
-
* The field is encoded as a JSON number for the reversible encoding.
|
|
27
|
-
* The field is omitted if the NamespaceIndex equals 0.
|
|
28
|
-
* For the non-reversible encoding, the field is the NamespaceUri associated with the NamespaceIndex,
|
|
29
|
-
* encoded as a JSON string.
|
|
30
|
-
* A NamespaceIndex of 1 is always encoded as a JSON number.
|
|
31
|
-
*/
|
|
32
|
-
export declare function opcuaJsonEncodeNodeId(value: NodeId, reversible?: boolean, namespaceArray?: string[]): NodeIdJSON;
|
|
33
|
-
export declare function opcuaJsonDecodeNodeId(pojo: NodeIdJSON, namespaceArray?: string[]): NodeId;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Sterfive 2020-2023
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { QualifiedName } from "node-opcua-data-model";
|
|
6
|
-
interface QualifiedNameJSON {
|
|
7
|
-
/** The Name component of the QualifiedName. */
|
|
8
|
-
Name: string;
|
|
9
|
-
/** The NamespaceIndex component of the QualifiedName encoded as a JSON number. */
|
|
10
|
-
Uri?: string | number;
|
|
11
|
-
}
|
|
12
|
-
export declare function opcuaJsonEncodeQualifiedName(qualifiedName: QualifiedName, reversible?: boolean, namespaceArray?: string[]): QualifiedNameJSON;
|
|
13
|
-
export declare function opcuaJsonDecodeQualifiedName(pojo: null | undefined | string | QualifiedNameJSON): QualifiedName;
|
|
14
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Sterfive 2020-2023
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
6
|
-
export interface StatusCodeJSON {
|
|
7
|
-
Code?: number | keyof StatusCodes;
|
|
8
|
-
Symbol?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* @param reversible
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
export declare function opcuaJsonEncodeStatusCode(statusCode: StatusCode, reversible?: boolean): StatusCodeJSON | number | undefined;
|
|
16
|
-
export declare function opcuaJsonDecodeStatusCode(pojo: StatusCodeJSON | number | null | undefined): StatusCode;
|
|
Binary file
|