MASIKAC - MOARdV/AvionicsSystems GitHub Wiki

MASIKAC.cs

The MASIKAC object encapsulates the interface with Kerbal Alarm Clock.


Kerbal Alarm Category

The functions for interacting with the Kerbal Alarm Clock are listed in this category.

kac.AlarmCount()

Returns: Count of alarms for this vessel; 0 or more.

Returns the number of future alarms scheduled for this vessel. Alarms that are in the past, or for other vessels, are not counted. If Kerbal Alarm Clock is not installed, this value is zero.

kac.AlarmExists(string alarmID)

  • alarmID: The ID of the alarm, typically from the return value of fc.CreateAlarm().

Returns: 1 if the alarm exists, 0 otherwise.

Scans the list of alarms assigned to this vessel to see if the alarm identified by alarmID exists. Returns 1 if it is found, 0 otherwise.

kac.Available()

Returns 1 if Kerbal Alarm Clock is installed and available on this craft, 0 if it is not available.

kac.CreateAlarm(string name, double UT)

  • name: The short name to apply to the alarm.
  • UT: The UT when the alarm should fire.

Returns: The alarm ID (a string), or an empty string if the method failed.

Create a Raw alarm at the time specified by UT, using the name name. This alarm is assigned to the current vessel ID.

kac.DeleteAlarm(string alarmID)

  • alarmID: The ID of the alarm to remove

Returns: 1 if the alarm was removed, 0 if it was not, or it did not exist, or the Kerbal Alarm Clock is not available.

Attempts to remove the alarm identified by alarmID. Normally, alarmID is the return value from fc.CreateAlarm().

kac.TimeToAlarm()

Returns: Time to the next alarm for the current vessel, in seconds; 0 if there are no alarms.

Returns the time to the next alarm scheduled in Kerbal Alarm Clock for this vessel. If no alarm is scheduled, or all alarms occurred in the past, this value is 0.


This documentation was automatically generated from source code at 12:50 UTC on 14/Aug/2018.