Skip to content

Repository files navigation

Orbipacket Protocol - C# Implementation

Orbipacket is a communication protocol developed by OrbiSat Oeiras for communication with CanSat devices. This is an implementation of that protocol in C#.

Nuget

You can find this package on nuget at Orbipacket.

Installation

To install the Orbipacket protocol, simply add the package to your .csproj with:

dotnet add package Orbipacket

Usage

You can find different uses in the Tests.cs file. For example, to add packets to the buffer and analyze them:

PacketBuffer buffer = new();
byte[] packet1;
byte[] packet2;
byte[] packet3;

buffer.Add(packet1);
buffer.Add(packet2);
buffer.Add(packet3);

// Loop ExtractFirstValidPacket() until no more valid packets can be extracted
byte[] extractedPacket;
while ((extractedPacket = buffer.ExtractFirstValidPacket()) != null)
{
    var packet = Decode.GetPacketInformation(extractedPacket);
    Console.WriteLine(
        $"Decoded Packet: DeviceId: {packet.DeviceId}, "
            + $"Timestamp: {packet.Timestamp}, "
            + $"Payload: {packet.Payload}, "
            + $"Type: {packet.Type}"
    );
}

Output

Decoded Packet: DeviceId: DeviceId1, Timestamp: Timestamp1, Payload: Payload1; Type: Type1
Decoded Packet: DeviceId: DeviceId2, Timestamp: Timestamp2, Payload: Payload2; Type: Type2
Decoded Packet: DeviceId: DeviceId3, Timestamp: Timestamp3, Payload: Payload3; Type: Type3

About

Implementação em C# do protocolo OrbiPacket. / C# implementation of the OrbiPacket protocol.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages