From 2321a0da0543134e7455a4b9b4d0edc0d8e75f4b Mon Sep 17 00:00:00 2001 From: Cristian Recoseanu Date: Tue, 1 Aug 2023 14:43:56 +0100 Subject: [PATCH] Make NcMethodResultLength value nullable --- code/src/NCModel/Core.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/src/NCModel/Core.ts b/code/src/NCModel/Core.ts index e9ed38c..56f5de2 100644 --- a/code/src/NCModel/Core.ts +++ b/code/src/NCModel/Core.ts @@ -265,13 +265,13 @@ export abstract class NcObject { case '1p7': { - let length = this.touchpoints?.length ?? 0; + let length = this.touchpoints?.length ?? null; return new CommandResponseWithValue(handle, NcMethodStatus.OK, length); } case '1p8': { - let length = this.runtimePropertyConstraints?.length ?? 0; + let length = this.runtimePropertyConstraints?.length ?? null; return new CommandResponseWithValue(handle, NcMethodStatus.OK, length); } @@ -626,11 +626,11 @@ export class NcMethodResultId extends NcMethodResult export class NcMethodResultLength extends NcMethodResult { - public value: number; + public value: number | null; public constructor( status: NcMethodStatus, - value: number) + value: number | null) { super(status); @@ -640,7 +640,7 @@ export class NcMethodResultLength extends NcMethodResult public static override GetTypeDescriptor(includeInherited: boolean): NcDatatypeDescriptor { let currentClassDescriptor = new NcDatatypeDescriptorStruct("NcMethodResultLength", [ - new NcFieldDescriptor("value", "NcUint32", false, false, null, "Length result value") + new NcFieldDescriptor("value", "NcUint32", true, false, null, "Length result value") ], "NcMethodResult", null, "Length method result") if(includeInherited)