Skip to content

Instantly share code, notes, and snippets.

@AngryAnt
Created January 23, 2017 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AngryAnt/f053be0c4c66fafde17d679c2d09a9c9 to your computer and use it in GitHub Desktop.
Save AngryAnt/f053be0c4c66fafde17d679c2d09a9c9 to your computer and use it in GitHub Desktop.
import "Protocol/Frame/Library.proto";
import "Protocol/Frame/Tree.proto";
import "Protocol/Frame/Collection.proto";
import "Protocol/Command/Tree.proto";
import "Protocol/Command/Override.proto";
import "Protocol/Command/Breakpoint.proto";
// NOTE: When we move from protobuf-net to Google.Protobuf, use the oneof keyword rather than the enum + optional dance
// Runtime advertisement
message BroadcastAvailable
{
required bytes IP = 1;
required int32 Port = 2;
required int64 Ticks = 3; // Last updated clock ticks
optional uint32 Version = 4 [default = 1];
optional string Name = 5;
}
// An event frame from the runtime
message Frame
{
enum FrameType
{
PingType = 0;
BigBufferType = 1;
InitialStateEndType = 2;
DebuggerStateChangeType = 3;
MarkerType = 4;
AddLibraryType = 10;
RemoveLibraryType = 11;
SetLibraryIdentifierType = 12;
AddTreeType = 20;
RemoveTreeType = 21;
UpdateTreeType = 22;
SetTreeIdentifierType = 23;
AddCollectionType = 30;
RemoveCollectionType = 31;
UpdateCollectionType = 32;
SetCollectionIdentifierType = 33;
}
required FrameType Type = 1;
required uint64 Ticks = 2; // Record-time clock ticks
optional BigBuffer BigBuffer = 3;
optional DebuggerStateChange DebuggerStateChange = 4;
optional Marker Marker = 5;
optional AddLibrary AddLibrary = 10;
optional RemoveLibrary RemoveLibrary = 11;
optional SetLibraryIdentifier SetLibraryIdentifier = 12;
optional AddTree AddTree = 20;
optional RemoveTree RemoveTree = 21;
optional UpdateTree UpdateTree = 22;
optional SetTreeIdentifier SetTreeIdentifier = 23;
optional AddCollection AddCollection = 30;
optional RemoveCollection RemoveCollection = 31;
optional UpdateCollection UpdateCollection = 32;
optional SetCollectionIdentifier SetCollectionIdentifier = 33;
}
message BigBuffer
{
required uint32 Size = 1;
}
message DebuggerStateChange
{
repeated AddOverride Overrides = 1;
repeated AddBreakpoint Breakpoints = 2;
}
message Marker
{
required uint32 ID = 1;
required string Label = 2;
}
// A command from a controller
message Command
{
enum CommandType
{
PingType = 0;
TickTreeType = 10;
ResetTreeType = 11;
SetTreePluggedType = 12;
AddOverrideType = 20;
RemoveOverrideType = 21;
AddBreakpointType = 30;
RemoveBreakpointType = 31;
}
required CommandType Type = 1;
required uint64 Ticks = 2; // Record-time clock ticks
optional TickTree TickTree = 10;
optional ResetTree ResetTree = 11;
optional SetTreePlugged SetTreePlugged = 12;
optional AddOverride AddOverride = 20;
optional RemoveOverride RemoveOverride = 21;
optional AddBreakpoint AddBreakpoint = 30;
optional RemoveBreakpoint RemoveBreakpoint = 31;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment