How botkalista/win-mikai works
win-mikai is a Windows command-line tool for checking a Mikai reader and reading or changing credit on a key. Its main workflow parses an action, uses the Mikai API to detect and initialize a reader/key, then reads credit or applies a dated add/set operation and writes changes back. The headers document additional key-management operations, but their implementations and internal call paths are not present in the sampled source, so they are not expanded here.
Main entry points: winmikai.cpp Action dispatch · mikai.h Key API · mikai-reader.h Reader API
Components 12
Command line
- Action dispatch
winmikai.cpp - Date helper
winmikai.cpp
Credit workflow
- Reader initialization
winmikai.cpp - Write helper
winmikai.cpp - Read credit
winmikai.cpp - Add credit
winmikai.cpp - Set credit
winmikai.cpp
Mikai API
- Reader API
include/mikai/mikai-reader.h - Key API
include/mikai/mikai.h
Other components
- Operator
- Mikai reader
- Mikai key
Connections 18
- Operator → Action dispatch: invokes
- Action dispatch → Reader API: checks readers
- Action dispatch → Reader initialization: initializes for action
- Reader initialization → Reader API: counts readers
- Reader initialization → Key API: initializes key
- Reader API → Mikai reader: accesses
- Key API → Mikai key: accesses
- Action dispatch → Read credit: dispatches read
- Read credit → Key API: gets credit
- Action dispatch → Add credit: dispatches add
- Add credit → Date helper: gets date
- Add credit → Key API: adds dated credit
- Action dispatch → Set credit: dispatches set
- Set credit → Date helper: gets date
- Set credit → Key API: sets dated credit
- Add credit → Write helper: on success
- Set credit → Write helper: on success
- Write helper → Reader API: writes modified blocks