@openxiot/xiot-core-spec-ts 0.0.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 +21 -0
- package/README.md +2 -0
- package/dist/index.d.ts +315 -0
- package/dist/index.js +331 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.js +50 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.js +14 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.js +18 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.js +43 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.js +48 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.js +38 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.js +39 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.d.ts +9 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.js +95 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.js +71 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.js +31 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.js +13 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.js +51 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.js +25 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.js +44 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.js +17 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.js +27 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.js +18 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.js +42 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.js +49 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.js +44 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.js +25 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.js +45 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.js +98 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.js +55 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.js +41 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.js +24 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.js +18 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.js +36 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.js +24 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.js +42 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.d.ts +12 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.js +36 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.js +122 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.js +220 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.js +16 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.js +21 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.js +47 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.js +49 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.js +27 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.js +84 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.js +65 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.js +70 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.js +63 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.d.ts +31 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.js +151 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.js +43 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.js +37 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.js +62 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.js +76 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.js +65 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.js +35 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.js +38 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.js +33 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.js +74 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.js +38 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.js +51 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.js +50 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.js +82 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.js +55 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.js +24 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.js +51 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.js +78 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.js +67 -0
- package/dist/xiot/core/spec/typedef/app/Application.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/app/Application.js +13 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.js +9 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.js +9 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.d.ts +48 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.js +52 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.js +17 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.js +37 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.js +87 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.d.ts +18 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.js +103 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.d.ts +23 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.js +96 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.js +115 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.js +53 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.js +33 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.js +67 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.js +80 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.js +36 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.js +39 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.js +18 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.js +146 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.js +30 -0
- package/dist/xiot/core/spec/typedef/device/Device.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/device/Device.js +9 -0
- package/dist/xiot/core/spec/typedef/error/IotError.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/error/IotError.js +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.js +76 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.js +30 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.js +283 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.js +48 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.js +73 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.js +172 -0
- package/dist/xiot/core/spec/typedef/instance/Action.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/instance/Action.js +33 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.js +18 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.js +17 -0
- package/dist/xiot/core/spec/typedef/instance/Event.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/instance/Event.js +23 -0
- package/dist/xiot/core/spec/typedef/instance/Property.d.ts +56 -0
- package/dist/xiot/core/spec/typedef/instance/Property.js +244 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.js +81 -0
- package/dist/xiot/core/spec/typedef/instance/Service.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/instance/Service.js +48 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.js +16 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.js +25 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.js +10 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.js +12 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.js +13 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.js +25 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.js +10 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.js +9 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.d.ts +27 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.js +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.js +13 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.js +31 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.d.ts +42 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.js +59 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.js +19 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.js +21 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.js +50 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.js +52 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.js +58 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.js +53 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.js +9 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.js +10 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.js +26 -0
- package/dist/xiot/core/spec/typedef/product/Product.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/product/Product.js +25 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.js +24 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.js +13 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.js +12 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.js +30 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.js +13 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.js +12 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.js +16 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.js +22 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.js +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.js +10 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.js +24 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.js +13 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.d.ts +44 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.js +174 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.js +56 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.js +11 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.js +12 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.js +57 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.js +59 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.js +43 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.js +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.js +48 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.js +85 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.js +32 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.js +22 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.js +20 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.js +67 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.js +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.js +102 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.js +2 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.js +70 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.js +72 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.d.ts +28 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.js +148 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.js +90 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.js +289 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.js +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.js +68 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.js +331 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.js +23 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.d.ts +91 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.js +269 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.d.ts +29 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.js +483 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.js +10 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.js +13 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.js +45 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.js +26 -0
- package/dist/xiot/core/spec/typedef/space/Space.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/space/Space.js +20 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.js +23 -0
- package/dist/xiot/core/spec/typedef/status/Status.d.ts +50 -0
- package/dist/xiot/core/spec/typedef/status/Status.js +54 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.js +120 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.js +33 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.js +23 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.js +26 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.js +16 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.js +46 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.js +35 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.js +14 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.d.ts +30 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.js +285 -0
- package/dist/xiot/core/spec/typedef/version/Version.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/version/Version.js +40 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.js +27 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.js +41 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.d.ts +2 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.js +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.js +30 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.js +20 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.js +29 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.d.ts +7 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.js +25 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.js +31 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.js +25 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.js +7 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.d.ts +12 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.js +20 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.d.ts +18 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.js +122 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.js +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.d.ts +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.d.ts +23 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.js +86 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.js +12 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.d.ts +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.js +144 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.d.ts +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.js +70 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.js +32 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.js +55 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.js +14 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.d.ts +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.js +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.js +11 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.js +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.d.ts +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.js +10 -0
- package/package.json +62 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceImage = void 0;
|
|
4
|
+
const Service_1 = require("../instance/Service");
|
|
5
|
+
const PropertyImage_1 = require("./PropertyImage");
|
|
6
|
+
const ActionImage_1 = require("./ActionImage");
|
|
7
|
+
const EventImage_1 = require("./EventImage");
|
|
8
|
+
const DataFormat_1 = require("../definition/property/data/DataFormat");
|
|
9
|
+
const Status_1 = require("../status/Status");
|
|
10
|
+
class ServiceImage extends Service_1.Service {
|
|
11
|
+
static of(s) {
|
|
12
|
+
return new ServiceImage(s.iid, s.type, s.description, s.getProperties().map(x => PropertyImage_1.PropertyImage.copy(x)), s.getActions().map(x => ActionImage_1.ActionImage.of(x)), s.getEvents().map(x => EventImage_1.EventImage.of(x)));
|
|
13
|
+
}
|
|
14
|
+
constructor(iid, type, description, properties, actions, events) {
|
|
15
|
+
super(iid, type, description, properties, actions, events);
|
|
16
|
+
}
|
|
17
|
+
getProperties() {
|
|
18
|
+
return super
|
|
19
|
+
.getProperties()
|
|
20
|
+
.filter(x => x instanceof PropertyImage_1.PropertyImage)
|
|
21
|
+
.map(x => x);
|
|
22
|
+
}
|
|
23
|
+
getActions() {
|
|
24
|
+
return super
|
|
25
|
+
.getActions()
|
|
26
|
+
.filter(x => x instanceof ActionImage_1.ActionImage)
|
|
27
|
+
.map(x => x);
|
|
28
|
+
}
|
|
29
|
+
getEvents() {
|
|
30
|
+
return super
|
|
31
|
+
.getEvents()
|
|
32
|
+
.filter(x => x instanceof EventImage_1.EventImage)
|
|
33
|
+
.map(x => x);
|
|
34
|
+
}
|
|
35
|
+
tryRead(o) {
|
|
36
|
+
if (o.pid == null) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const p = this.properties.get(o.pid.iid);
|
|
40
|
+
if (p != null) {
|
|
41
|
+
if (p instanceof PropertyImage_1.PropertyImage) {
|
|
42
|
+
p.tryRead(o);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
o.status = Status_1.Status.UNDEFINED;
|
|
46
|
+
o.description = 'property not instanceof PropertyImage';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
o.status = Status_1.Status.PROPERTY_NOT_FOUND;
|
|
51
|
+
o.description = 'property not found';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
tryWrite(o, save) {
|
|
55
|
+
if (o.pid == null) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const p = this.properties.get(o.pid.iid);
|
|
59
|
+
if (p != null) {
|
|
60
|
+
if (p instanceof PropertyImage_1.PropertyImage) {
|
|
61
|
+
if (DataFormat_1.DataFormat.COMBINATION === p.format) {
|
|
62
|
+
const members = o.value;
|
|
63
|
+
for (const piid of p.members) {
|
|
64
|
+
const value = members.get(piid);
|
|
65
|
+
if (value === null || value === undefined) {
|
|
66
|
+
o.status = Status_1.Status.PROPERTY_VALUE_INVALID;
|
|
67
|
+
o.description = `property value is null: piid: ${piid}`;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
const propertyItem = this.properties.get(piid);
|
|
71
|
+
if (!(propertyItem === null || propertyItem === void 0 ? void 0 : propertyItem.trySetValue(value))) {
|
|
72
|
+
o.status = Status_1.Status.PROPERTY_VALUE_INVALID;
|
|
73
|
+
o.description = `property value invalid: piid: ${piid}, value: ${value}`;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (o.status >= 0) {
|
|
78
|
+
o.status = Status_1.Status.COMPLETED;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
p.tryWrite(o, save);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
o.status = Status_1.Status.UNDEFINED;
|
|
87
|
+
o.description = 'property not instanceof PropertyImage';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
o.status = Status_1.Status.PROPERTY_NOT_FOUND;
|
|
92
|
+
o.description = 'property not found';
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
tryInvoke(o) {
|
|
96
|
+
if (o.aid == null) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const a = this.actions.get(o.aid.iid);
|
|
100
|
+
if (a != null) {
|
|
101
|
+
if (a instanceof ActionImage_1.ActionImage) {
|
|
102
|
+
a.tryInvoke(o, this.properties);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
o.status = Status_1.Status.UNDEFINED;
|
|
106
|
+
o.description = 'action not instanceof ActionImage';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
o.status = Status_1.Status.ACTION_NOT_FOUND;
|
|
111
|
+
o.description = 'action not found';
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
tryEventOccurred(o) {
|
|
115
|
+
if (o.eid == null) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const e = this.events.get(o.eid.iid);
|
|
119
|
+
if (e != null) {
|
|
120
|
+
if (e instanceof EventImage_1.EventImage) {
|
|
121
|
+
e.tryEventOccurred(o, this.properties);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
o.status = Status_1.Status.UNDEFINED;
|
|
125
|
+
o.description = 'event not instanceof EventImage';
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
o.status = Status_1.Status.EVENT_NOT_FOUND;
|
|
130
|
+
o.description = 'event not found';
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
update(o) {
|
|
134
|
+
if (o.pid == null) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const p = this.properties.get(o.pid.iid);
|
|
138
|
+
if (p != null) {
|
|
139
|
+
if (p instanceof PropertyImage_1.PropertyImage) {
|
|
140
|
+
p.update(o);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
o.status = Status_1.Status.UNDEFINED;
|
|
144
|
+
o.description = 'property not instanceof PropertyImage';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
o.status = Status_1.Status.PROPERTY_NOT_FOUND;
|
|
149
|
+
o.description = 'property not found';
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
onPropertiesChanged(o) {
|
|
153
|
+
if (o.pid == null) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const p = this.properties.get(o.pid.iid);
|
|
157
|
+
if (p != null) {
|
|
158
|
+
if (p instanceof PropertyImage_1.PropertyImage) {
|
|
159
|
+
p.onPropertiesChanged(o);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
o.status = Status_1.Status.UNDEFINED;
|
|
163
|
+
o.description = 'property not instanceof PropertyImage';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
o.status = Status_1.Status.PROPERTY_NOT_FOUND;
|
|
168
|
+
o.description = 'property not found';
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.ServiceImage = ServiceImage;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActionType } from '../definition/urn/ActionType';
|
|
2
|
+
import { Argument } from './Argument';
|
|
3
|
+
export declare class Action {
|
|
4
|
+
iid: number;
|
|
5
|
+
type: ActionType;
|
|
6
|
+
description: Map<string, string>;
|
|
7
|
+
in: Map<number, Argument>;
|
|
8
|
+
out: Map<number, Argument>;
|
|
9
|
+
constructor(iid: number, type: ActionType, description: Map<string, string>, argumentsIn: Argument[], argumentsOut: Argument[]);
|
|
10
|
+
getArgumentsIn(): Argument[];
|
|
11
|
+
getArgumentsOut(): Argument[];
|
|
12
|
+
addArgumentIn(arg: Argument): void;
|
|
13
|
+
addArgumentOut(arg: Argument): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Action = void 0;
|
|
4
|
+
class Action {
|
|
5
|
+
constructor(iid, type, description, argumentsIn, argumentsOut) {
|
|
6
|
+
this.iid = 0;
|
|
7
|
+
this.description = new Map();
|
|
8
|
+
this.in = new Map();
|
|
9
|
+
this.out = new Map();
|
|
10
|
+
this.iid = iid;
|
|
11
|
+
this.type = type;
|
|
12
|
+
this.description = description;
|
|
13
|
+
argumentsIn.forEach(x => {
|
|
14
|
+
return this.in.set(x.piid, x);
|
|
15
|
+
});
|
|
16
|
+
argumentsOut.forEach(x => {
|
|
17
|
+
return this.out.set(x.piid, x);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
getArgumentsIn() {
|
|
21
|
+
return Array.from(this.in.values());
|
|
22
|
+
}
|
|
23
|
+
getArgumentsOut() {
|
|
24
|
+
return Array.from(this.out.values());
|
|
25
|
+
}
|
|
26
|
+
addArgumentIn(arg) {
|
|
27
|
+
this.in.set(arg.piid, arg);
|
|
28
|
+
}
|
|
29
|
+
addArgumentOut(arg) {
|
|
30
|
+
this.out.set(arg.piid, arg);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.Action = Action;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Argument = void 0;
|
|
4
|
+
class Argument {
|
|
5
|
+
constructor(piid) {
|
|
6
|
+
this.minRepeat = 1;
|
|
7
|
+
this.maxRepeat = 1;
|
|
8
|
+
this.values = [];
|
|
9
|
+
this.piid = piid;
|
|
10
|
+
}
|
|
11
|
+
static of(piid, minRepeat, maxRepeat) {
|
|
12
|
+
const arg = new Argument(piid);
|
|
13
|
+
arg.minRepeat = minRepeat;
|
|
14
|
+
arg.maxRepeat = maxRepeat;
|
|
15
|
+
return arg;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Argument = Argument;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Service } from './Service';
|
|
2
|
+
import { Urn } from "../definition/urn/Urn";
|
|
3
|
+
export declare class DeviceInstance {
|
|
4
|
+
type: Urn;
|
|
5
|
+
description: Map<string, string>;
|
|
6
|
+
services: Map<number, Service>;
|
|
7
|
+
constructor(type: Urn, description: Map<string, string>, services: Service[]);
|
|
8
|
+
getServices(): Service[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceInstance = void 0;
|
|
4
|
+
class DeviceInstance {
|
|
5
|
+
constructor(type, description, services) {
|
|
6
|
+
this.type = type;
|
|
7
|
+
this.description = description;
|
|
8
|
+
this.services = new Map();
|
|
9
|
+
services.forEach(x => {
|
|
10
|
+
return this.services.set(x.iid, x);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
getServices() {
|
|
14
|
+
return Array.from(this.services.values());
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.DeviceInstance = DeviceInstance;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventType } from '../definition/urn/EventType';
|
|
2
|
+
import { Argument } from './Argument';
|
|
3
|
+
export declare class Event {
|
|
4
|
+
iid: number;
|
|
5
|
+
type: EventType;
|
|
6
|
+
description: Map<string, string>;
|
|
7
|
+
arguments: Map<number, Argument>;
|
|
8
|
+
constructor(iid: number, type: EventType, description: Map<string, string>, list: Argument[]);
|
|
9
|
+
getArguments(): Argument[];
|
|
10
|
+
addArgument(arg: Argument): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Event = void 0;
|
|
4
|
+
class Event {
|
|
5
|
+
constructor(iid, type, description, list) {
|
|
6
|
+
this.iid = 0;
|
|
7
|
+
this.description = new Map();
|
|
8
|
+
this.arguments = new Map();
|
|
9
|
+
this.iid = iid;
|
|
10
|
+
this.type = type;
|
|
11
|
+
this.description = description;
|
|
12
|
+
list.forEach(x => {
|
|
13
|
+
return this.arguments.set(x.piid, x);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
getArguments() {
|
|
17
|
+
return Array.from(this.arguments.values());
|
|
18
|
+
}
|
|
19
|
+
addArgument(arg) {
|
|
20
|
+
this.arguments.set(arg.piid, arg);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.Event = Event;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PropertyValue } from './PropertyValue';
|
|
2
|
+
import { DataFormat } from '../definition/property/data/DataFormat';
|
|
3
|
+
import { Access } from '../definition/property/Access';
|
|
4
|
+
import { ConstraintValue } from '../definition/property/ConstraintValue';
|
|
5
|
+
import { PropertyType } from "../definition/urn/PropertyType";
|
|
6
|
+
import { PropertyOperation } from "../operation/PropertyOperation";
|
|
7
|
+
import { PropertyDefinition } from "../definition/PropertyDefinition";
|
|
8
|
+
import { ValueRange } from "../definition/property/ValueRange";
|
|
9
|
+
import { ValueList } from "../definition/property/ValueList";
|
|
10
|
+
export declare class Property {
|
|
11
|
+
iid: number;
|
|
12
|
+
type: PropertyType;
|
|
13
|
+
description: Map<string, string>;
|
|
14
|
+
format: DataFormat;
|
|
15
|
+
access: Access;
|
|
16
|
+
constraintValue: ConstraintValue | null;
|
|
17
|
+
unit: string | null;
|
|
18
|
+
members: Array<number>;
|
|
19
|
+
value: PropertyValue;
|
|
20
|
+
static copy(other: Property): Property;
|
|
21
|
+
static of(iid: number, def: PropertyDefinition): Property;
|
|
22
|
+
constructor(iid: number | undefined, type: PropertyType, description: Map<string, string>, format: DataFormat, access: Access, constraintValue?: ConstraintValue | null, unit?: string | null, members?: Array<number>);
|
|
23
|
+
hasConstraintValue(): boolean;
|
|
24
|
+
hasValueRange(): boolean;
|
|
25
|
+
hasValueList(): boolean;
|
|
26
|
+
valueRange(): ValueRange | null;
|
|
27
|
+
valueList(): ValueList | null;
|
|
28
|
+
formatCombination(): boolean;
|
|
29
|
+
formatBoolean(): boolean;
|
|
30
|
+
formatString(): boolean;
|
|
31
|
+
formatNumber(): boolean;
|
|
32
|
+
setDefaultValue(value: any): void;
|
|
33
|
+
trySetValues(values: any[]): boolean;
|
|
34
|
+
trySetValue(value: Object): boolean;
|
|
35
|
+
setValue(value: Object): boolean;
|
|
36
|
+
setValueForOperation(o: PropertyOperation): void;
|
|
37
|
+
private setDataValue;
|
|
38
|
+
private setDataValueWithException;
|
|
39
|
+
private validate;
|
|
40
|
+
getValue(): any;
|
|
41
|
+
/**
|
|
42
|
+
* 忽略属性是否可写,给属性的成员赋值时,使用此接口给属性赋值。
|
|
43
|
+
* @param value 属性值
|
|
44
|
+
*/
|
|
45
|
+
put(value: any): void;
|
|
46
|
+
/**
|
|
47
|
+
* 忽略属性是否可写,给属性的成员赋值时,使用此接口给属性赋值。
|
|
48
|
+
* @param value 属性值
|
|
49
|
+
*/
|
|
50
|
+
putValue(value: any): void;
|
|
51
|
+
/**
|
|
52
|
+
* 构造组合属性值,由具体的组合属性实现,普通属性不需要实现。
|
|
53
|
+
*/
|
|
54
|
+
valueOf(value: Map<number, any>): any | null;
|
|
55
|
+
toMap(value: any): Map<number, any>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Property = void 0;
|
|
4
|
+
const PropertyValue_1 = require("./PropertyValue");
|
|
5
|
+
const DataValueFactory_1 = require("../definition/property/data/DataValueFactory");
|
|
6
|
+
const DataFormat_1 = require("../definition/property/data/DataFormat");
|
|
7
|
+
const IotError_1 = require("../error/IotError");
|
|
8
|
+
const Status_1 = require("../status/Status");
|
|
9
|
+
const ValueRange_1 = require("../definition/property/ValueRange");
|
|
10
|
+
const ValueList_1 = require("../definition/property/ValueList");
|
|
11
|
+
class Property {
|
|
12
|
+
static copy(other) {
|
|
13
|
+
const p = new Property(other.iid, other.type, other.description, other.format, other.access, other.constraintValue, other.unit, other.members);
|
|
14
|
+
p.value = PropertyValue_1.PropertyValue.copy(other.value);
|
|
15
|
+
return p;
|
|
16
|
+
}
|
|
17
|
+
static of(iid, def) {
|
|
18
|
+
return new Property(iid, def.type, def.description, def.format, def.access, def.constraintValue, def.unit, []);
|
|
19
|
+
}
|
|
20
|
+
constructor(iid = 0, type, description, format, access, constraintValue = null, unit = null, members = []) {
|
|
21
|
+
this.iid = iid;
|
|
22
|
+
this.type = type;
|
|
23
|
+
this.description = description;
|
|
24
|
+
this.format = format;
|
|
25
|
+
this.access = access;
|
|
26
|
+
this.constraintValue = constraintValue;
|
|
27
|
+
this.unit = unit;
|
|
28
|
+
this.members = members;
|
|
29
|
+
this.value = new PropertyValue_1.PropertyValue(this.format);
|
|
30
|
+
}
|
|
31
|
+
// fixDefaultValue(): void {
|
|
32
|
+
// const list = this.valueList();
|
|
33
|
+
// const range = this.valueRange();
|
|
34
|
+
//
|
|
35
|
+
// if (list != null) {
|
|
36
|
+
// const v: ValueDefinition = list.values[0];
|
|
37
|
+
// if (v != null) {
|
|
38
|
+
// this.value.currentValue = v.value;
|
|
39
|
+
// }
|
|
40
|
+
// } else if (range != null) {
|
|
41
|
+
// const v = range.minValue;
|
|
42
|
+
// if (v != null) {
|
|
43
|
+
// this.value.currentValue = v;
|
|
44
|
+
// }
|
|
45
|
+
// }
|
|
46
|
+
// }
|
|
47
|
+
hasConstraintValue() {
|
|
48
|
+
return this.constraintValue != null;
|
|
49
|
+
}
|
|
50
|
+
hasValueRange() {
|
|
51
|
+
return this.constraintValue instanceof ValueRange_1.ValueRange;
|
|
52
|
+
}
|
|
53
|
+
hasValueList() {
|
|
54
|
+
return this.constraintValue instanceof ValueList_1.ValueList;
|
|
55
|
+
}
|
|
56
|
+
valueRange() {
|
|
57
|
+
if (this.constraintValue instanceof ValueRange_1.ValueRange) {
|
|
58
|
+
return this.constraintValue;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
valueList() {
|
|
63
|
+
if (this.constraintValue instanceof ValueList_1.ValueList) {
|
|
64
|
+
return this.constraintValue;
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
formatCombination() {
|
|
69
|
+
return this.format == DataFormat_1.DataFormat.COMBINATION;
|
|
70
|
+
}
|
|
71
|
+
formatBoolean() {
|
|
72
|
+
return this.format == DataFormat_1.DataFormat.BOOL;
|
|
73
|
+
}
|
|
74
|
+
formatString() {
|
|
75
|
+
switch (this.format) {
|
|
76
|
+
case DataFormat_1.DataFormat.STRING:
|
|
77
|
+
case DataFormat_1.DataFormat.HEX:
|
|
78
|
+
case DataFormat_1.DataFormat.TLV8:
|
|
79
|
+
return true;
|
|
80
|
+
default:
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
formatNumber() {
|
|
85
|
+
switch (this.format) {
|
|
86
|
+
case DataFormat_1.DataFormat.FLOAT:
|
|
87
|
+
case DataFormat_1.DataFormat.UINT8:
|
|
88
|
+
case DataFormat_1.DataFormat.UINT16:
|
|
89
|
+
case DataFormat_1.DataFormat.UINT32:
|
|
90
|
+
case DataFormat_1.DataFormat.INT8:
|
|
91
|
+
case DataFormat_1.DataFormat.INT16:
|
|
92
|
+
case DataFormat_1.DataFormat.INT32:
|
|
93
|
+
case DataFormat_1.DataFormat.INT64:
|
|
94
|
+
return true;
|
|
95
|
+
default:
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
setDefaultValue(value) {
|
|
100
|
+
if (value != null) {
|
|
101
|
+
const v = DataValueFactory_1.DataValueFactory.create(this.format, value);
|
|
102
|
+
if (this.validate(v)) {
|
|
103
|
+
this.value.defaultValue = v;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
console.log("setDefaultValue error, validate failed!");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
trySetValues(values) {
|
|
111
|
+
for (const o of values) {
|
|
112
|
+
if (!this.trySetValue(o)) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
trySetValue(value) {
|
|
119
|
+
return this.setDataValue(value, false);
|
|
120
|
+
}
|
|
121
|
+
setValue(value) {
|
|
122
|
+
return this.setDataValue(value, true);
|
|
123
|
+
}
|
|
124
|
+
setValueForOperation(o) {
|
|
125
|
+
try {
|
|
126
|
+
this.setDataValueWithException(DataValueFactory_1.DataValueFactory.create(this.format, o.value), true);
|
|
127
|
+
o.status = Status_1.Status.COMPLETED;
|
|
128
|
+
}
|
|
129
|
+
catch (e) {
|
|
130
|
+
if (e instanceof IotError_1.IotError) {
|
|
131
|
+
o.status = e.status;
|
|
132
|
+
o.description = e.description;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
o.status = Status_1.Status.INTERNAL_ERROR;
|
|
136
|
+
o.description = 'undefined error';
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
setDataValue(newValue, write) {
|
|
141
|
+
if (newValue == null) {
|
|
142
|
+
console.log('setDataValue failed: newValue is null');
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
let v;
|
|
146
|
+
try {
|
|
147
|
+
v = DataValueFactory_1.DataValueFactory.create(this.format, newValue);
|
|
148
|
+
}
|
|
149
|
+
catch (e) {
|
|
150
|
+
console.log('DataValueFactory.create failed: newValue: ' + newValue + ', format: ' + this.format + ', iid: ' + this.iid + ' => ', e);
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
if (!this.validate(v)) {
|
|
154
|
+
console.log('setDataValue failed, validate failed: ', v);
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
if (this.value == null) {
|
|
158
|
+
console.log('setDataValue failed, property.value is null');
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
if (write) {
|
|
162
|
+
this.value.update(v);
|
|
163
|
+
}
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
setDataValueWithException(newValue, write) {
|
|
167
|
+
if (newValue == null) {
|
|
168
|
+
throw new IotError_1.IotError(Status_1.Status.PROPERTY_VALUE_ERROR, "property value is null");
|
|
169
|
+
}
|
|
170
|
+
if (!this.validate(newValue)) {
|
|
171
|
+
throw new IotError_1.IotError(Status_1.Status.PROPERTY_VALUE_INVALID, "property value invalid: " + newValue.rawValue());
|
|
172
|
+
}
|
|
173
|
+
if (write) {
|
|
174
|
+
this.value.update(newValue);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
validate(value) {
|
|
178
|
+
if (value == null) {
|
|
179
|
+
console.log("property value validate failed, value is null");
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
if (this.format !== value.getFormat()) {
|
|
183
|
+
console.log(`validate failed, format not matched: ${this.format.toString()} != ${value.getFormat().toString()}`);
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
if (this.constraintValue == null) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
if (this.constraintValue.validate(value)) {
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
console.log('validate failed: ', `${this.constraintValue.toString()} invalid value: ${value.rawValue()}`);
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
getValue() {
|
|
196
|
+
if (this.format == DataFormat_1.DataFormat.COMBINATION) {
|
|
197
|
+
if (this.value.value().rawValue() instanceof Map) {
|
|
198
|
+
const v = this.value.value().rawValue();
|
|
199
|
+
return this.valueOf(v);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
return this.value.value().rawValue();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* 忽略属性是否可写,给属性的成员赋值时,使用此接口给属性赋值。
|
|
211
|
+
* @param value 属性值
|
|
212
|
+
*/
|
|
213
|
+
put(value) {
|
|
214
|
+
if (this.format == DataFormat_1.DataFormat.COMBINATION) {
|
|
215
|
+
if (!this.setValue(this.toMap(value))) {
|
|
216
|
+
throw new IotError_1.IotError(Status_1.Status.PROPERTY_VALUE_ERROR, "property value invalid");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
if (!this.setValue(value)) {
|
|
221
|
+
throw new IotError_1.IotError(Status_1.Status.PROPERTY_VALUE_ERROR, "property value invalid");
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* 忽略属性是否可写,给属性的成员赋值时,使用此接口给属性赋值。
|
|
227
|
+
* @param value 属性值
|
|
228
|
+
*/
|
|
229
|
+
putValue(value) {
|
|
230
|
+
if (!this.setValue(value)) {
|
|
231
|
+
throw new IotError_1.IotError(Status_1.Status.PROPERTY_VALUE_ERROR, "property value invalid");
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* 构造组合属性值,由具体的组合属性实现,普通属性不需要实现。
|
|
236
|
+
*/
|
|
237
|
+
valueOf(value) {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
toMap(value) {
|
|
241
|
+
return new Map();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
exports.Property = Property;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DataFormat } from '../definition/property/data/DataFormat';
|
|
2
|
+
import { DataValue } from '../definition/property/data/DataValue';
|
|
3
|
+
export declare class PropertyValue {
|
|
4
|
+
format: DataFormat;
|
|
5
|
+
initValue: DataValue<any>;
|
|
6
|
+
defaultValue: DataValue<any> | null;
|
|
7
|
+
currentValue: DataValue<any> | null;
|
|
8
|
+
static copy(o: PropertyValue): PropertyValue;
|
|
9
|
+
constructor(format: DataFormat);
|
|
10
|
+
update(newValue: DataValue<any>): void;
|
|
11
|
+
value(): DataValue<any>;
|
|
12
|
+
private refreshValueForDebuggerOrSimulator;
|
|
13
|
+
_stringValue: string;
|
|
14
|
+
_numberValue: number;
|
|
15
|
+
_booleanValue: boolean;
|
|
16
|
+
}
|