[OPEN-SOURCE] Machinery Modelling Toolkit

TrackTransmissionModuleR/L are the components that you need to provide input to. They have their own brakes and they integrate angular velocity of the sprocket. Their base class is TrackTransmissionProcessorModular and it implements interface that allows it to receive Torque/MomentOfInertia/AngularVelocity from other parts of drive train and send the same data back when requested.
There was a bit of discussion about this starting from previous page of this thread.