Skip to content

Commit

Permalink
chore: build models
Browse files Browse the repository at this point in the history
  • Loading branch information
kjy5 committed Jul 5, 2024
1 parent 4298cb5 commit 3e42998
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 58 deletions.
91 changes: 38 additions & 53 deletions models/csharp/EphysLinkModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,49 +27,6 @@ public BooleanStateResponse(bool state, string error)
}
}

[Serializable]
public struct CanWriteRequest
{
public string ManipulatorId;
public bool CanWrite;
public float Hours;

public CanWriteRequest(string manipulatorId, bool canWrite, float hours)
{
ManipulatorId = manipulatorId;
CanWrite = canWrite;
Hours = hours;
}
}

[Serializable]
public struct DriveToDepthRequest
{
public string ManipulatorId;
public float Depth;
public float Speed;

public DriveToDepthRequest(string manipulatorId, float depth, float speed)
{
ManipulatorId = manipulatorId;
Depth = depth;
Speed = speed;
}
}

[Serializable]
public struct DriveToDepthResponse
{
public float Depth;
public string Error;

public DriveToDepthResponse(float depth, string error)
{
Depth = depth;
Error = error;
}
}

[Serializable]
public struct EphysLinkOptions
{
Expand Down Expand Up @@ -115,27 +72,53 @@ public GetManipulatorsResponse(string[] manipulators, int numAxes, Vector4 dimen


[Serializable]
public struct GotoPositionRequest
public struct PositionalResponse
{
public string ManipulatorId;
public Vector4 Position;
public string Error;

public PositionalResponse(Vector4 position, string error)
{
Position = position;
Error = error;
}
}

[Serializable]
public struct SetDepthRequest
{
public string ManipulatorId;
public float Depth;
public float Speed;

public GotoPositionRequest(string manipulatorId, Vector4 position, float speed)
public SetDepthRequest(string manipulatorId, float depth, float speed)
{
ManipulatorId = manipulatorId;
Position = position;
Depth = depth;
Speed = speed;
}
}

[Serializable]
public struct InsideBrainRequest
public struct SetDepthResponse
{
public float Depth;
public string Error;

public SetDepthResponse(float depth, string error)
{
Depth = depth;
Error = error;
}
}

[Serializable]
public struct SetInsideBrainRequest
{
public string ManipulatorId;
public bool Inside;

public InsideBrainRequest(string manipulatorId, bool inside)
public SetInsideBrainRequest(string manipulatorId, bool inside)
{
ManipulatorId = manipulatorId;
Inside = inside;
Expand All @@ -144,15 +127,17 @@ public InsideBrainRequest(string manipulatorId, bool inside)


[Serializable]
public struct PositionalResponse
public struct SetPositionRequest
{
public string ManipulatorId;
public Vector4 Position;
public string Error;
public float Speed;

public PositionalResponse(Vector4 position, string error)
public SetPositionRequest(string manipulatorId, Vector4 position, float speed)
{
ManipulatorId = manipulatorId;
Position = position;
Error = error;
Speed = speed;
}
}

Expand Down
1 change: 0 additions & 1 deletion models/schemas/ephys_link/CanWriteRequest.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description": "Request format for driving a manipulator to depth.\n\n:param manipulator_id: ID of the manipulator to move.\n:type manipulator_id: str\n:param depth: Depth to drive to in mm.\n:type depth: float\n:param speed: Speed to drive at in mm/s.\n:type speed: float", "properties": {"ManipulatorId": {"minLength": 1, "title": "Manipulatorid", "type": "string"}, "Depth": {"title": "Depth", "type": "number"}, "Speed": {"exclusiveMinimum": 0.0, "title": "Speed", "type": "number"}}, "required": ["ManipulatorId", "Depth", "Speed"], "title": "DriveToDepthRequest", "type": "object"}
{"description": "Request format for driving a manipulator to depth.\n\n:param manipulator_id: ID of the manipulator to move.\n:type manipulator_id: str\n:param depth: Depth to drive to in mm.\n:type depth: float\n:param speed: Speed to drive at in mm/s.\n:type speed: float", "properties": {"ManipulatorId": {"minLength": 1, "title": "Manipulatorid", "type": "string"}, "Depth": {"title": "Depth", "type": "number"}, "Speed": {"exclusiveMinimum": 0.0, "title": "Speed", "type": "number"}}, "required": ["ManipulatorId", "Depth", "Speed"], "title": "SetDepthRequest", "type": "object"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description": "Response format for driving a manipulator to depth.\n\n:param depth: Depth the manipulator is at in mm.\n:type depth: float\n:param error: Error message if any.\n:type error: str", "properties": {"Depth": {"default": 0, "title": "Depth", "type": "number"}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "DriveToDepthResponse", "type": "object"}
{"description": "Response format for driving a manipulator to depth.\n\n:param depth: Depth the manipulator is at in mm.\n:type depth: float\n:param error: Error message if any.\n:type error: str", "properties": {"Depth": {"default": 0, "title": "Depth", "type": "number"}, "Error": {"default": "", "title": "Error", "type": "string"}}, "title": "SetDepthResponse", "type": "object"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description": "Request format for setting inside brain state.\n\n:param manipulator_id: ID of the manipulator to move.\n:type manipulator_id: str\n:param inside: Whether the manipulator is inside the brain.\n:type inside: bool", "properties": {"ManipulatorId": {"minLength": 1, "title": "Manipulatorid", "type": "string"}, "Inside": {"title": "Inside", "type": "boolean"}}, "required": ["ManipulatorId", "Inside"], "title": "InsideBrainRequest", "type": "object"}
{"description": "Request format for setting inside brain state.\n\n:param manipulator_id: ID of the manipulator to move.\n:type manipulator_id: str\n:param inside: Whether the manipulator is inside the brain.\n:type inside: bool", "properties": {"ManipulatorId": {"minLength": 1, "title": "Manipulatorid", "type": "string"}, "Inside": {"title": "Inside", "type": "boolean"}}, "required": ["ManipulatorId", "Inside"], "title": "SetInsideBrainRequest", "type": "object"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$defs": {"Vector4": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}, "w": {"default": 0.0, "title": "W", "type": "number"}}, "title": "Vector4", "type": "object"}}, "description": "Request format for moving a manipulator to a position.\n\n:param manipulator_id: ID of the manipulator to move.\n:type manipulator_id: str\n:param position: Position to move to in mm (X, Y, Z, W).\n:type position: Vector4\n:param speed: Speed to move at in mm/s.\n:type speed: float", "properties": {"ManipulatorId": {"minLength": 1, "title": "Manipulatorid", "type": "string"}, "Position": {"$ref": "#/$defs/Vector4"}, "Speed": {"exclusiveMinimum": 0.0, "title": "Speed", "type": "number"}}, "required": ["ManipulatorId", "Position", "Speed"], "title": "GotoPositionRequest", "type": "object"}
{"$defs": {"Vector4": {"properties": {"x": {"default": 0.0, "title": "X", "type": "number"}, "y": {"default": 0.0, "title": "Y", "type": "number"}, "z": {"default": 0.0, "title": "Z", "type": "number"}, "w": {"default": 0.0, "title": "W", "type": "number"}}, "title": "Vector4", "type": "object"}}, "description": "Request format for moving a manipulator to a position.\n\n:param manipulator_id: ID of the manipulator to move.\n:type manipulator_id: str\n:param position: Position to move to in mm (X, Y, Z, W).\n:type position: Vector4\n:param speed: Speed to move at in mm/s.\n:type speed: float", "properties": {"ManipulatorId": {"minLength": 1, "title": "Manipulatorid", "type": "string"}, "Position": {"$ref": "#/$defs/Vector4"}, "Speed": {"exclusiveMinimum": 0.0, "title": "Speed", "type": "number"}}, "required": ["ManipulatorId", "Position", "Speed"], "title": "SetPositionRequest", "type": "object"}

0 comments on commit 3e42998

Please sign in to comment.