|
| 1 | +namespace OpenEphys.ProbeInterface.NET |
| 2 | +{ |
| 3 | + /// <summary> |
| 4 | + /// Struct that extends the Probeinterface specification by encapsulating all values for a single contact. |
| 5 | + /// </summary> |
| 6 | + public readonly struct Contact |
| 7 | + { |
| 8 | + /// <summary> |
| 9 | + /// Gets the x-position of the contact. |
| 10 | + /// </summary> |
| 11 | + public float PosX { get; } |
| 12 | + |
| 13 | + /// <summary> |
| 14 | + /// Gets the y-position of the contact. |
| 15 | + /// </summary> |
| 16 | + public float PosY { get; } |
| 17 | + |
| 18 | + /// <summary> |
| 19 | + /// Gets the <see cref="ContactShape"/> of the contact. |
| 20 | + /// </summary> |
| 21 | + public ContactShape Shape { get; } |
| 22 | + |
| 23 | + /// <summary> |
| 24 | + /// Gets the <see cref="ContactShapeParam"/>'s of the contact. |
| 25 | + /// </summary> |
| 26 | + public ContactShapeParam ShapeParams { get; } |
| 27 | + |
| 28 | + /// <summary> |
| 29 | + /// Gets the device ID of the contact. |
| 30 | + /// </summary> |
| 31 | + public int DeviceId { get; } |
| 32 | + |
| 33 | + /// <summary> |
| 34 | + /// Gets the contact ID of the contact. |
| 35 | + /// </summary> |
| 36 | + public string ContactId { get; } |
| 37 | + |
| 38 | + /// <summary> |
| 39 | + /// Gets the shank ID of the contact. |
| 40 | + /// </summary> |
| 41 | + public string ShankId { get; } |
| 42 | + |
| 43 | + /// <summary> |
| 44 | + /// Gets the index of the contact within the <see cref="Probe"/> object. |
| 45 | + /// </summary> |
| 46 | + public int Index { get; } |
| 47 | + |
| 48 | + /// <summary> |
| 49 | + /// Initializes a new instance of the <see cref="Contact"/> struct. |
| 50 | + /// </summary> |
| 51 | + /// <param name="posX">Center value of the contact on the X-axis.</param> |
| 52 | + /// <param name="posY">Center value of the contact on the Y-axis.</param> |
| 53 | + /// <param name="shape">The <see cref="ContactShape"/> of the contact.</param> |
| 54 | + /// <param name="shapeParam"><see cref="ContactShapeParam"/>'s relevant to the <see cref="ContactShape"/> of the contact.</param> |
| 55 | + /// <param name="deviceId">The device channel index (<see cref="Probe.DeviceChannelIndices"/>) of this contact.</param> |
| 56 | + /// <param name="contactId">The contact ID (<see cref="Probe.ContactIds"/>) of this contact.</param> |
| 57 | + /// <param name="shankId">The shank ID (<see cref="Probe.ShankIds"/>) of this contact.</param> |
| 58 | + /// <param name="index">The index of the contact within the context of the <see cref="Probe"/>.</param> |
| 59 | + public Contact(float posX, float posY, ContactShape shape, ContactShapeParam shapeParam, |
| 60 | + int deviceId, string contactId, string shankId, int index) |
| 61 | + { |
| 62 | + PosX = posX; |
| 63 | + PosY = posY; |
| 64 | + Shape = shape; |
| 65 | + ShapeParams = shapeParam; |
| 66 | + DeviceId = deviceId; |
| 67 | + ContactId = contactId; |
| 68 | + ShankId = shankId; |
| 69 | + Index = index; |
| 70 | + } |
| 71 | + } |
| 72 | +} |
0 commit comments