32 lines
854 B
C
32 lines
854 B
C
#include "servicepoint.h"
|
|
|
|
int main(void) {
|
|
UdpConnection *connection = sp_udp_open_ipv4(172, 23, 42, 29, 2342);
|
|
if (connection == NULL)
|
|
return 1;
|
|
|
|
sp_udp_send_command(connection, sp_command_clear());
|
|
|
|
CharGrid *grid = sp_char_grid_new(5, 2);
|
|
if (grid == NULL)
|
|
return 1;
|
|
|
|
sp_char_grid_set(grid, 0, 0, 'H');
|
|
sp_char_grid_set(grid, 1, 0, 'e');
|
|
sp_char_grid_set(grid, 2, 0, 'l');
|
|
sp_char_grid_set(grid, 3, 0, 'l');
|
|
sp_char_grid_set(grid, 4, 0, 'o');
|
|
sp_char_grid_set(grid, 0, 1, 'W');
|
|
sp_char_grid_set(grid, 1, 1, 'o');
|
|
sp_char_grid_set(grid, 2, 1, 'r');
|
|
sp_char_grid_set(grid, 3, 1, 'l');
|
|
sp_char_grid_set(grid, 4, 1, 'd');
|
|
|
|
|
|
TypedCommand *command = sp_command_char_grid(0, 0, grid);
|
|
sp_udp_send_command(connection, command);
|
|
|
|
sp_udp_free(connection);
|
|
return 0;
|
|
}
|