src/models/port/port.ts
Serializable REDHAWK Port Model
Properties |
Methods |
Accessors |
deserialize | ||||||||
deserialize(input: any)
|
||||||||
Defined in src/models/port/port.ts:36
|
||||||||
Deserializes a JSON object into this class
Parameters :
Returns :
this
|
Public direction |
direction:
|
Type : enums.PortDirection
|
Defined in src/models/port/port.ts:14
|
Port Direction (Uses/Provides) |
Public idl |
idl:
|
Type : PortIDL
|
Defined in src/models/port/port.ts:16
|
IDL expansion of repID |
Public name |
name:
|
Type : string
|
Defined in src/models/port/port.ts:10
|
Port Name |
Public repId |
repId:
|
Type : string
|
Defined in src/models/port/port.ts:12
|
Representation ID (of the interface) |
hasBulkioWebsocket |
gethasBulkioWebsocket()
|
Defined in src/models/port/port.ts:19
|
Indicates this is a BULKIO port that supports the websocket interface.
Returns :
boolean
|
isFEIControllable |
getisFEIControllable()
|
Defined in src/models/port/port.ts:28
|
Indicates this is an FEI port that supports the control interface.
Returns :
boolean
|
import { ISerializable } from '../serialization/index';
import * as enums from './enums/index';
import { PortIDL } from './port-idl';
/**
* Serializable REDHAWK Port Model
*/
export class Port implements ISerializable<Port> {
/** Port Name */
public name: string;
/** Representation ID (of the interface) */
public repId: string;
/** Port Direction (Uses/Provides) */
public direction: enums.PortDirection;
/** IDL expansion of repID */
public idl: PortIDL;
/** Indicates this is a BULKIO port that supports the websocket interface. */
public get hasBulkioWebsocket(): boolean {
return (
this.direction === enums.PortDirection.Uses &&
this.idl.namespace === enums.PortIDLNameSpace.BULKIO &&
this.idl.type !== enums.PortBulkIOIDLType.dataOctet
);
}
/** Indicates this is an FEI port that supports the control interface. */
public get isFEIControllable(): boolean {
return (
this.direction === enums.PortDirection.Provides &&
this.idl.namespace === enums.PortIDLNameSpace.FRONTEND
);
}
/** Deserializes a JSON object into this class */
deserialize(input: any) {
this.name = input.name;
this.repId = input.repId;
this.direction = enums.resolvePortDirection(input.direction);
this.idl = new PortIDL().deserialize(input.idl);
return this;
}
}