Expand description
C API wrapper for the servicepoint crate.
§Examples
#include <stdio.h>
#include "servicepoint.h"
int main(void) {
UdpSocket *connection = sp_udp_open("172.23.42.29:2342");
if (connection == NULL)
return 1;
Bitmap *pixels = sp_bitmap_new(SP_PIXEL_WIDTH, SP_PIXEL_HEIGHT);
sp_bitmap_fill(pixels, true);
TypedCommand *command = sp_command_bitmap_linear_win(0, 0, pixels, Uncompressed);
while (sp_udp_send_command(connection, sp_command_clone(command)));
sp_command_free(command);
sp_udp_free(connection);
return 0;
}
There are more examples in the source repository.
Modules§
- commands
- Functions related to commands.
- containers
- Functions related to servicepoint::Bitmap, servicepoint::CharGrid and friends.
- packet
- Functions related to servicepoint::Packet.
- udp
- Functions related to servicepoint::UdpSocketExt.
Constants§
- SP_
FRAME_ PACING_ MS - Actual hardware limit is around 28-29ms/frame. Rounded up for less dropped packets.