add command code constants, send header

This commit is contained in:
Vinzenz Schroeter 2025-04-12 21:47:23 +02:00
commit ce70ecd9e2
12 changed files with 141 additions and 60 deletions

View file

@ -9,7 +9,7 @@
//! #include "servicepoint.h"
//!
//! int main(void) {
//! UdpConnection *connection = sp_connection_open("172.23.42.29:2342");
//! UdpConnection *connection = sp_udp_open("172.23.42.29:2342");
//! if (connection == NULL)
//! return 1;
//!
@ -17,10 +17,10 @@
//! sp_bitmap_fill(pixels, true);
//!
//! TypedCommand *command = sp_command_bitmap_linear_win(0, 0, pixels, Uncompressed);
//! while (sp_connection_send_command(connection, sp_command_clone(command)));
//! while (sp_udp_send_command(connection, sp_command_clone(command)));
//!
//! sp_command_free(command);
//! sp_connection_free(connection);
//! sp_udp_free(connection);
//! return 0;
//! }
//! ```
@ -30,10 +30,11 @@ pub use crate::bitvec::*;
pub use crate::brightness_grid::*;
pub use crate::byte_slice::*;
pub use crate::char_grid::*;
pub use crate::command::*;
pub use crate::commands::*;
pub use crate::connection::*;
pub use crate::cp437_grid::*;
pub use crate::packet::*;
pub use servicepoint::CommandCode;
use std::ptr::NonNull;
mod bitmap;
@ -41,7 +42,7 @@ mod bitvec;
mod brightness_grid;
mod byte_slice;
mod char_grid;
mod command;
mod commands;
mod connection;
mod cp437_grid;
mod packet;