File

protocol-opcua/opcua-device-protocol-data-reporting.component.ts

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Inputs

groupName
Type : any
model
Type : any

Outputs

onSubscriptionChange
Type : EventEmitter<any>

Methods

updateModel
updateModel()
Returns : void

Properties

_model
Type : object
cyclicReadParameters
Type : object
Default value : { rate: undefined }
discard
Type : any[]
Default value : [ { value: true, label: gettext('oldest`data`') }, { value: false, label: gettext('newest`data`') } ]
filters
Type : any[]
Default value : [ { value: 'None', label: gettext('None') }, { value: 'absolute', label: gettext('Absolute') }, { value: 'percent', label: gettext('Percent') } ]
parseReadingInterval
Default value : () => {...}
requireCyclic
Type : boolean
Default value : false
requireSubscription
Type : boolean
Default value : false
subscription
Type : object
Default value : { type: 'None' }
subscriptionParameters
Type : object
Default value : { samplingRate: undefined, deadbandType: 'None', deadbandValue: undefined, ranges: '', queueSize: undefined, dataChangeTrigger: 'Status', discardOldest: true }
subscriptionTypeName
Type : string
Default value : 'subscriptionType'
triggers
Type : any[]
Default value : [ { value: 'Status', label: gettext('Status') }, { value: 'StatusValue', label: gettext('Status/Value') }, { value: 'StatusValueTimestamp', label: gettext('Status/Value/Timestamp') } ]
types
Type : any[]
Default value : [ { value: 'None', label: gettext('None') }, { value: 'CyclicRead', label: gettext('Cyclic read') }, { value: 'Subscription', label: gettext('Subscription') } ]

Accessors

model
setmodel(_model)
Parameters :
Name Optional
_model No
Returns : void
<c8y-form-group>
  <label translate>Mechanism</label>
  <label
    title="{{ mechanism.label | translate }}"
    class="c8y-radio radio-inline"
    *ngFor="let mechanism of types"
  >
    <input
      type="radio"
      name="{{subscriptionTypeName}}"
      [value]="mechanism.value"
      [(ngModel)]="subscription.type"
      (change)="updateModel()"
      required
    />
    <span></span>
    <span>{{ mechanism.label | translate }}</span>
  </label>
</c8y-form-group>

<div class="row collapse" [collapse]="subscription.type != 'CyclicRead'" [isAnimated]="true">
  <div class="col-sm-6 col-md-4 col-lg-3">
    <c8y-form-group>
      <label translate>Reading interval</label>
      <div class="input-group">
        <input
          class="form-control"
          type="number"
          name="rate"
          [(ngModel)]="cyclicReadParameters.rate"
          placeholder="{{ 'e.g.' | translate }} 50"
          [required]="requireCyclic"
          min="50"
        />
        <span class="input-group-addon units" title="{{ 'Milliseconds' | translate }}">
          {{ 'msec' | translate }}
        </span>
      </div>
    </c8y-form-group>
  </div>
</div>

<div class="row collapse" [collapse]="subscription.type != 'Subscription'" [isAnimated]="true">
  <div class="col-sm-6 col-lg-4">
    <c8y-form-group>
      <label translate>Sampling interval</label>
      <div class="input-group">
        <input
          class="form-control"
          type="number"
          name="samplingRate"
          [(ngModel)]="subscriptionParameters.samplingRate"
          placeholder="{{ 'e.g.' | translate }} 500"
          [required]="requireSubscription"
          min="0"
        />
        <span class="input-group-addon units" title="{{ 'Milliseconds' | translate }}" translate>
          msec
        </span>
      </div>
    </c8y-form-group>
  </div>
  <div class="col-sm-6 col-lg-4">
    <c8y-form-group>
      <label translate>Queue size</label>
      <div class="input-group">
        <input
          class="form-control"
          type="number"
          name="queueSize"
          [(ngModel)]="subscriptionParameters.queueSize"
          placeholder="{{ 'e.g.' | translate }} 10"
          min="1"
        />
        <span class="input-group-addon">
          <strong translate>Discard</strong>&nbsp;
          <label
            *ngFor="let discardOption of discard"
            title="{{ discardOption.label | translate }}"
            class="c8y-radio radio-inline"
          >
            <input
              type="radio"
              name="discard"
              [value]="discardOption.value"
              [(ngModel)]="subscriptionParameters.discardOldest"
              [required]="requireSubscription"
            />
            <span></span>
            <span>{{ discardOption.label | translate }}</span>
          </label>
        </span>
      </div>
    </c8y-form-group>
  </div>
  <div class="clearfix"></div>
  <div class="col-sm-6 col-lg-4">
    <c8y-form-group>
      <label translate>Data change trigger</label>
      <label
        *ngFor="let trigger of triggers"
        title="{{ trigger.label | translate }}"
        class="c8y-radio radio-inline"
      >
        <input
          type="radio"
          name="dataChangeTrigger"
          [value]="trigger.value"
          [(ngModel)]="subscriptionParameters.dataChangeTrigger"
          [required]="requireSubscription"
        />
        <span></span>
        <span>{{ trigger.label | translate }}</span>
      </label>
    </c8y-form-group>
  </div>
  <div class="col-sm-6 col-lg-4">
    <c8y-form-group>
      <label translate>Deadband filter</label>
      <label
        *ngFor="let deadbandFilter of filters"
        title="{{ deadbandFilter.label | translate }}"
        class="c8y-radio radio-inline"
      >
        <input
          type="radio"
          name="deadbandType"
          [value]="deadbandFilter.value"
          [(ngModel)]="subscriptionParameters.deadbandType"
          [required]="requireSubscription"
        />
        <span></span>
        <span>{{ deadbandFilter.label | translate }}</span>
      </label>
    </c8y-form-group>
    <div [collapse]="subscriptionParameters.deadbandType == 'None'" [isAnimated]="true">
      <c8y-form-group>
        <label translate>Deadband value</label>
        <input
          class="form-control"
          type="number"
          name="deadbandValue"
          [(ngModel)]="subscriptionParameters.deadbandValue"
          placeholder="{{ 'e.g.' | translate }} 10"
          [required]="subscriptionParameters.deadbandType != 'None'"
          min="0"
        />
      </c8y-form-group>
    </div>
  </div>
</div>

results matching ""

    No results matching ""