1.0.6 • Published 11 months ago

krp-node-wrapper v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

krp-node-wrapper

Node.js Wrapper to communicate with Kart Racing Pro Server.

With krp-node-wrapper you have a wrapper which reads the data from the udp livetiming server.

Requirements

  • None

Installing

This package was tested under Node.js 16.16.0 x64.

Kart Racing Pro release13b was used while testing.

npm install krp-node-wrapper

API documentation

Types

Under src/types/

ServerWrapper:
Update Data Types:
EventT
EntryT
EntryRemoveT
SessionT
SessionStatusT
WeatherT
SessionEntryT
DriverStatusT
BestLapT
LastLapT
PenaltyT
LapT
SplitT
SpeedT
ClassificationT
ChallengeDataT
TrackDataT
TrackSegmentT
TrackPositionT
ContactT

ClientWrapper:
Update Data Types:
KartDataT
KartEventT
KartLapT
KartSessionT
KartSplitT

ServerWrapper

Examples

const wrapper = new KRPNodeWrapper(Hostname, Port, Password, Logging)
EventDescription
"connected"Shared Memory connected.
"disconnected"Shared Memory disconnected.
"update"Sends all the received data.
wrapper.on("update", (type: string, data) => {
    console.log(type, data)
})
Function / AttributeDescription
connectedIs udp client connected?
wrapper.connected

ClientWrapper

Configuration

proxy_udp.ini

[params]
enable = 1
port = 30000
ip = 127.0.0.1:30001
delay = 1
info = 1

Examples

const wrapper = new KRPNodeWrapper(Port, Logging)
EventDescription
"update"Sends all the received data.
wrapper.on("update", (type: string, data) => {
    console.log(type, data)
})

License

Released under the MIT License.

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago