UDPServer/src/com/eh7n/f1telemetry/F1_output.java
/**
     * Main class in case you want to run the server independently. Uses defaults
     * for bind address and port, and just logs the incoming packets as a JSON
     * object to the location defined in the logback config
     *
     * @param args
     * @throws IOException
     */
Main class in case you want to run the server independently. Uses defaults
for bind address and port, and just logs the incoming packets as a JSON
object to the location defined in the logback config

@param args
@throws IOException
Main class in case you want to run the server independently . Uses defaults for bind address and port and just logs the incoming packets as a JSON object to the location defined in the logback config @param args @throws IOException
public static void main(String[] args) throws IOException {
        F12018TelemetryUDPServer.create()
                .bindTo("0.0.0.0")
                .onPort(20777)
                .consumeWith((p) -> {
                    p.demo();
                    System.out.println("Paket type: "+p.getHeader().getPacketId());
                    if((p.getHeader().getPacketId()==0)||(p.getHeader().getPacketId()==6)){
                        p.convert_brake_to_byte();
                        p.convert_throttle_to_byte();
                        p.convert_direction_to_byte();
                    }
                    System.out.println("Processing");
                    p.convert_brake_to_byte();
                    p.convert_throttle_to_byte();
                    p.convert_direction_to_byte();
                })
                .start();
    }
public static void main ( String [ ] args ) throws IOException { F12018TelemetryUDPServer . create ( ) . bindTo ( "0.0.0.0" ) . onPort ( 20777 ) . consumeWith ( ( p ) -> { p . demo ( ) ; System . out . println ( "Paket type: " + p . getHeader ( ) . getPacketId ( ) ) ; if ( ( p . getHeader ( ) . getPacketId ( ) == 0 ) || ( p . getHeader ( ) . getPacketId ( ) == 6 ) ) { p . convert_brake_to_byte ( ) ; p . convert_throttle_to_byte ( ) ; p . convert_direction_to_byte ( ) ; } System . out . println ( "Processing" ) ; p . convert_brake_to_byte ( ) ; p . convert_throttle_to_byte ( ) ; p . convert_direction_to_byte ( ) ; } ) . start ( ) ; }
Main class in case you want to run the server independently.
Main class in case you want to run the server independently .