Skip to content

Commit

Permalink
more disciplined exporting; expose the message modules (ack, ...) and…
Browse files Browse the repository at this point in the history
… the Message class
  • Loading branch information
SillyFreak committed Nov 8, 2018
1 parent 8348b2f commit c7b3f36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions hedgehog/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './client/hedgehogClient';
export { ack, io, analog, digital, motor, servo, process, Message } from './protocol';
7 changes: 2 additions & 5 deletions hedgehog/protocol/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import * as motor from './messages/motor';
import * as servo from './messages/servo';
import * as process from './messages/process';

export {
ack, io, analog, digital,
motor, servo, process,
};
export { ack, io, analog, digital, motor, servo, process };

export { RequestMsg, ReplyMsg, message, Message, ContainerMessage, ProtoContainerMessage } from './messages';
export { RequestMsg, ReplyMsg, Message, ContainerMessage } from './messages';
4 changes: 2 additions & 2 deletions hedgehog/utils/protobuf/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type Class<T> = new (...args: any[]) => T;
type DefaultCtorClass<T> = new () => T;

export interface ProtoMessage {
interface ProtoMessage {
serializeBinary(): Uint8Array;
}
export interface ProtoContainerMessage extends ProtoMessage {
Expand Down Expand Up @@ -75,7 +75,7 @@ export class ContainerMessage {

export abstract class Message {
public isAsync = false;
public meta: MessageMeta;
private meta: MessageMeta;

public abstract serializeTo(containerMsg: ProtoContainerMessage): void;
}

0 comments on commit c7b3f36

Please sign in to comment.