Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion src/core/federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import type {
Reaction,
Variable,
TaggedEvent,
SchedulableAction
SchedulableAction,
UtilityFunctions
} from "./internal";
import {
Log,
Expand Down Expand Up @@ -1184,6 +1185,24 @@ class RTIClient extends EventEmitter {
});
}
}
interface FedreateUtilityFunctions extends UtilityFunctions {
sendRTIMessage: <T>(
data: T,
destFederateID: number,
destPortID: number
) => void;
sendRTITimedMessage: <T>(
data: T,
destFederateID: number,
destPortID: number,
time: TimeValue | undefined
) => void;
sendRTIPortAbsent: (
destFederateID: number,
destPortID: number,
additionalDelay: TimeValue | undefined
) => void;
}

/**
* Enum type to store the state of stop request.
Expand Down
2 changes: 1 addition & 1 deletion src/core/reactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ export interface Runtime {
delete: (r: Reactor) => void;
isRunning: () => boolean;
}
interface UtilityFunctions {
export interface UtilityFunctions {
requestStop: () => void;
reportError: (message?: string) => void;
requestErrorStop: (message?: string) => void;
Expand Down