@@ -233,10 +233,8 @@ class AssetInterfaceDescriptionUtilTest {
233233 expect ( tdObj . properties . device_name . forms [ 0 ] )
234234 . to . have . property ( "href" )
235235 . to . eql ( "modbus+tcp://192.168.178.146:502/1/40020?quantity=16" ) ;
236- expect ( tdObj . properties . device_name . forms [ 0 ] )
237- . to . have . property ( "modbus:function" )
238- . to . eql ( "readHoldingRegisters" ) ;
239- expect ( tdObj . properties . device_name . forms [ 0 ] ) . to . have . property ( "modbus:type" ) . to . eql ( "string" ) ;
236+ expect ( tdObj . properties . device_name . forms [ 0 ] ) . to . have . property ( "modv:function" ) . to . eql ( "readHoldingRegisters" ) ;
237+ expect ( tdObj . properties . device_name . forms [ 0 ] ) . to . have . property ( "modv:type" ) . to . eql ( "string" ) ;
240238 expect ( tdObj . properties . device_name . forms [ 0 ] )
241239 . to . have . property ( "contentType" )
242240 . to . eql ( "application/octet-stream" ) ;
@@ -270,8 +268,8 @@ class AssetInterfaceDescriptionUtilTest {
270268 expect ( tdObj . properties . soc . forms [ 0 ] )
271269 . to . have . property ( "href" )
272270 . to . eql ( "modbus+tcp://192.168.178.146:502/40361?quantity=1" ) ;
273- expect ( tdObj . properties . soc . forms [ 0 ] ) . to . have . property ( "modbus :function" ) . to . eql ( "readHoldingRegisters" ) ;
274- expect ( tdObj . properties . soc . forms [ 0 ] ) . to . have . property ( "modbus :type" ) . to . eql ( "uint16be" ) ;
271+ expect ( tdObj . properties . soc . forms [ 0 ] ) . to . have . property ( "modv :function" ) . to . eql ( "readHoldingRegisters" ) ;
272+ expect ( tdObj . properties . soc . forms [ 0 ] ) . to . have . property ( "modv :type" ) . to . eql ( "uint16be" ) ;
275273 expect ( tdObj . properties . soc . forms [ 0 ] ) . to . have . property ( "contentType" ) . to . eql ( "application/octet-stream" ) ;
276274 expect ( tdObj . properties . device_name . forms [ 0 ] ) . not . to . have . property ( "security" ) ;
277275 }
@@ -352,11 +350,11 @@ class AssetInterfaceDescriptionUtilTest {
352350 expect ( hasThingTitle , "No thing title" ) . to . equal ( true ) ;
353351 expect ( hasEndpointMetadata , "No EndpointMetadata" ) . to . equal ( true ) ;
354352
355- // InterfaceMetadata with properties etc
356- let hasInterfaceMetadata = false ;
353+ // InteractionMetadata with properties etc
354+ let hasInteractionMetadata = false ;
357355 for ( const smValue of smInterface . value ) {
358- if ( smValue . idShort === "InterfaceMetadata " ) {
359- hasInterfaceMetadata = true ;
356+ if ( smValue . idShort === "InteractionMetadata " ) {
357+ hasInteractionMetadata = true ;
360358 expect ( smValue ) . to . have . property ( "value" ) . to . be . an ( "array" ) . to . have . lengthOf . greaterThan ( 0 ) ;
361359 let hasProperties = false ;
362360 for ( const interactionValues of smValue . value ) {
@@ -410,12 +408,12 @@ class AssetInterfaceDescriptionUtilTest {
410408 } else if ( formEntry . idShort === "contentType" ) {
411409 hasContentType = true ;
412410 expect ( formEntry . value ) . to . equal ( "application/octet-stream" ) ;
413- } else if ( formEntry . idShort === "modbus_function " ) {
414- // vs. "modbus :function"
411+ } else if ( formEntry . idShort === "modv_function " ) {
412+ // vs. "modv :function"
415413 hasModbusFunction = true ;
416414 expect ( formEntry . value ) . to . equal ( "readHoldingRegisters" ) ;
417- } else if ( formEntry . idShort === "modbus_type " ) {
418- // vs. "modbus :type"
415+ } else if ( formEntry . idShort === "modv_type " ) {
416+ // vs. "modv :type"
419417 hasModbusType = true ;
420418 expect ( formEntry . value ) . to . equal ( "string" ) ;
421419 }
@@ -476,12 +474,12 @@ class AssetInterfaceDescriptionUtilTest {
476474 } else if ( formEntry . idShort === "contentType" ) {
477475 hasContentType = true ;
478476 expect ( formEntry . value ) . to . equal ( "application/octet-stream" ) ;
479- } else if ( formEntry . idShort === "modbus_function " ) {
480- // vs. "modbus :function"
477+ } else if ( formEntry . idShort === "modv_function " ) {
478+ // vs. "modv :function"
481479 hasModbusFunction = true ;
482480 expect ( formEntry . value ) . to . equal ( "readHoldingRegisters" ) ;
483- } else if ( formEntry . idShort === "modbus_type " ) {
484- // vs. "modbus :type"
481+ } else if ( formEntry . idShort === "modv_type " ) {
482+ // vs. "modv :type"
485483 hasModbusType = true ;
486484 expect ( formEntry . value ) . to . equal ( "uint16be" ) ;
487485 }
@@ -506,7 +504,7 @@ class AssetInterfaceDescriptionUtilTest {
506504 expect ( hasProperties ) . to . equal ( true ) ;
507505 }
508506 }
509- expect ( hasInterfaceMetadata , "No InterfaceMetadata " ) . to . equal ( true ) ;
507+ expect ( hasInteractionMetadata , "No InteractionMetadata " ) . to . equal ( true ) ;
510508 }
511509
512510 td1Base = "https://www.example.com/" ;
@@ -671,11 +669,11 @@ class AssetInterfaceDescriptionUtilTest {
671669 expect ( hasThingTitle , "No thing title" ) . to . equal ( true ) ;
672670 expect ( hasEndpointMetadata , "No EndpointMetadata" ) . to . equal ( true ) ;
673671
674- // InterfaceMetadata with properties etc
675- let hasInterfaceMetadata = false ;
672+ // InteractionMetadata with properties etc
673+ let hasInteractionMetadata = false ;
676674 for ( const smValue of smInterface . value ) {
677- if ( smValue . idShort === "InterfaceMetadata " ) {
678- hasInterfaceMetadata = true ;
675+ if ( smValue . idShort === "InteractionMetadata " ) {
676+ hasInteractionMetadata = true ;
679677 expect ( smValue ) . to . have . property ( "value" ) . to . be . an ( "array" ) . to . have . lengthOf . greaterThan ( 0 ) ;
680678 let hasProperties = false ;
681679 for ( const interactionValues of smValue . value ) {
@@ -806,7 +804,7 @@ class AssetInterfaceDescriptionUtilTest {
806804 expect ( hasProperties ) . to . equal ( true ) ;
807805 }
808806 }
809- expect ( hasInterfaceMetadata , "No InterfaceMetadata " ) . to . equal ( true ) ;
807+ expect ( hasInteractionMetadata , "No InteractionMetadata " ) . to . equal ( true ) ;
810808
811809 // Test to use all possible prefixes -> in this case it is only https
812810 // Note: id is autogenerated (if not present) -> needs to be exluded/removed/set in TD
@@ -825,11 +823,11 @@ class AssetInterfaceDescriptionUtilTest {
825823 const smInterface = smObj . submodelElements [ 0 ] ;
826824 expect ( smInterface ) . to . have . property ( "value" ) . to . be . an ( "array" ) . to . have . lengthOf . greaterThan ( 0 ) ;
827825
828- // InterfaceMetadata with *no* properties for this protocol
829- let hasInterfaceMetadata = false ;
826+ // InteractionMetadata with *no* properties for this protocol
827+ let hasInteractionMetadata = false ;
830828 for ( const smValue of smInterface . value ) {
831- if ( smValue . idShort === "InterfaceMetadata " ) {
832- hasInterfaceMetadata = true ;
829+ if ( smValue . idShort === "InteractionMetadata " ) {
830+ hasInteractionMetadata = true ;
833831 expect ( smValue ) . to . have . property ( "value" ) . to . be . an ( "array" ) . to . have . lengthOf . greaterThan ( 0 ) ;
834832 for ( const interactionValues of smValue . value ) {
835833 if ( interactionValues . idShort === "properties" ) {
@@ -838,7 +836,7 @@ class AssetInterfaceDescriptionUtilTest {
838836 }
839837 }
840838 }
841- expect ( hasInterfaceMetadata , "No InterfaceMetadata " ) . to . equal ( true ) ;
839+ expect ( hasInteractionMetadata , "No InteractionMetadata " ) . to . equal ( true ) ;
842840 }
843841
844842 @test async "should correctly transform sample TD1 into JSON AAS" ( ) {
@@ -866,8 +864,8 @@ class AssetInterfaceDescriptionUtilTest {
866864 {
867865 href : "modbus+tcp://127.0.0.1:60000/1" ,
868866 op : "readproperty" ,
869- "modbus :function" : "readCoil" ,
870- "modbus :pollingTime" : 1 ,
867+ "modv :function" : "readCoil" ,
868+ "modv :pollingTime" : 1 ,
871869 } ,
872870 ] ,
873871 } ,
@@ -941,11 +939,11 @@ class AssetInterfaceDescriptionUtilTest {
941939 expect ( hasThingTitle , "No thing title" ) . to . equal ( true ) ;
942940 expect ( hasEndpointMetadata , "No EndpointMetadata" ) . to . equal ( true ) ;
943941
944- // InterfaceMetadata with properties etc
945- let hasInterfaceMetadata = false ;
942+ // InteractionMetadata with properties etc
943+ let hasInteractionMetadata = false ;
946944 for ( const smValue of smInterface . value ) {
947- if ( smValue . idShort === "InterfaceMetadata " ) {
948- hasInterfaceMetadata = true ;
945+ if ( smValue . idShort === "InteractionMetadata " ) {
946+ hasInteractionMetadata = true ;
949947 expect ( smValue ) . to . have . property ( "value" ) . to . be . an ( "array" ) . to . have . lengthOf . greaterThan ( 0 ) ;
950948 let hasProperties = false ;
951949 for ( const interactionValues of smValue . value ) {
@@ -995,10 +993,10 @@ class AssetInterfaceDescriptionUtilTest {
995993 hasOp = true ;
996994 // Note: AID does not know "op"
997995 // expect(formEntry.value).to.equal("readproperty");
998- } else if ( formEntry . idShort === "modbus_function " ) {
996+ } else if ( formEntry . idShort === "modv_function " ) {
999997 hasModbusFunction = true ;
1000998 expect ( formEntry . value ) . to . equal ( "readCoil" ) ;
1001- } else if ( formEntry . idShort === "modbus_pollingTime " ) {
999+ } else if ( formEntry . idShort === "modv_pollingTime " ) {
10021000 hasModbusAddress = true ;
10031001 expect ( formEntry . value ) . to . equal ( "1" ) ;
10041002 expect ( formEntry . valueType ) . to . equal ( "xs:int" ) ;
@@ -1023,7 +1021,7 @@ class AssetInterfaceDescriptionUtilTest {
10231021 expect ( hasProperties ) . to . equal ( true ) ;
10241022 }
10251023 }
1026- expect ( hasInterfaceMetadata , "No InterfaceMetadata " ) . to . equal ( true ) ;
1024+ expect ( hasInteractionMetadata , "No InteractionMetadata " ) . to . equal ( true ) ;
10271025 }
10281026
10291027 @test . skip async "should correctly transform counter TD into JSON AAS" ( ) {
0 commit comments