@corvina/device-client
Version:
Corvina NodeJS Device Client
70 lines • 2.34 kB
TypeScript
import { MessagePublisherPolicy, State, StateTS } from "./messagepublisherpolicies";
import { InternalMessageSenderOptions, MessageSender } from "./messagesender";
export declare class MessagePublisher {
protected _topic: string;
protected _topicType: string;
protected _tagName: string;
protected _modelPath: string;
protected _nextTime: StateTS;
protected _policy: MessagePublisherPolicy;
protected _armed: boolean;
protected _stateToPublish: State;
protected _lastStateVersion: number;
protected _lastPublishedStateVersion: number;
private _messageSender;
constructor({ sourceTag, modelPath, topic, topicType, }: {
sourceTag: string;
modelPath: string;
topic: string;
topicType: string;
});
get policy(): MessagePublisherPolicy;
get modelPath(): string;
setPolicy(policy: MessagePublisherPolicy): void;
update({ tagName, newState, currentTime }: {
tagName: string;
newState: State;
currentTime: StateTS;
}): StateTS;
rearm(currentTime: StateTS): StateTS;
nextTime(currentTime: StateTS): StateTS;
publish(currentTime: StateTS, messageSender: MessageSender, options?: InternalMessageSenderOptions): void;
get topic(): string;
get topicType(): string;
get tagName(): string;
toString(): string;
}
export declare class AggregatedMessagePublisher extends MessagePublisher {
private _recomputePolicy;
constructor({ sourceTag, modelPath, topic }: {
sourceTag: string;
modelPath: string;
topic: string;
});
get modelPath(): string;
addField({ tagName, fieldName, type }: {
tagName: string;
fieldName: string;
type: string;
}): void;
update({ tagName, newState, currentTime }: {
tagName: string;
newState: State;
currentTime: StateTS;
}): StateTS;
publish(currentTime: StateTS, messageSender: MessageSender, options?: InternalMessageSenderOptions): void;
toString(): string;
get fields(): {
tagName: any;
fieldName: any;
type: any;
lastValueToPublish: any;
}[];
protected _fields: {
tagName: any;
fieldName: any;
type: any;
lastValueToPublish: any;
}[];
}
//# sourceMappingURL=messagepublisher.d.ts.map