verifier

package
v0.0.0-...-f2d3015 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReqInitClock requires:
	// No later than 5s after simulation start, the flight software shall indicate that the clock is calibrated.
	ReqInitClock = "ReqInitClock"
	// ReqReceipt requires:
	// No later than 100ms after each command's receive point, the flight software shall indicate the command’s receipt
	// exactly once.
	ReqReceipt = "ReqReceipt"
	// ReqCmdRecvExpected requires:
	// The flight software shall not indicate command receipt if a corresponding command was not uplinked to the
	// spacecraft within the last 100ms.
	ReqCmdRecvExpected = "ReqCmdRecvExpected"
	// ReqCmdCompleteExpected requires:
	// The flight software shall not indicate command completion if a corresponding command was not uplinked to the
	// spacecraft within the last 300ms.
	ReqCmdCompleteExpected = "ReqCmdCompleteExpected"
	// ReqCompletePing requires:
	// No later than 200ms after each Ping command's receive point, the flight software shall indicate the command's
	// completion.
	ReqCompletePing = "ReqCompletePing"
	// ReqPingPong requires:
	// No later than 200ms after each Ping command's receive point, the flight software shall indicate a Pong with a
	// matching PingID.
	ReqPingPong = "ReqPingPong"
	// ReqMagSetPwr requires:
	// No later than 200ms after each MagSetPwrState command's receive point, the flight software shall have updated
	// the power state of the magnetometer device to the specified state, if it differs.
	ReqMagSetPwr = "ReqMagSetPwr"
	// ReqUnchangedPwr requires:
	// The power state of the magnetometer device shall not be changed unless specifically commanded.
	ReqUnchangedPwr = "ReqUnchangedPwr"
	// ReqMagSetPwrComplete requires:
	// No later than 300ms after each MagSetPwrState command's receive point, the flight software shall indicate the
	// command's completion.
	ReqMagSetPwrComplete = "ReqMagSetPwrComplete"
	// ReqCollectMagReadings requires:
	// While the magnetometer is powered, the flight software shall collect readings from the magnetometer once every
	// 100ms, with a jitter of less than 5ms.
	ReqCollectMagReadings = "ReqCollectMagReadings"
	// ReqDownlinkMagReadings requires:
	// Every reading from the magnetometer shall be downlinked and received as part of a telemetry packet in less than
	// 10s after the collection point, with a timestamp reflecting the actual collection time to within 500us, and
	// the correct readings for each of the three axes.
	ReqDownlinkMagReadings = "ReqDownlinkMagReadings"
	// ReqOrderedMagReadings requires:
	// Magnetometer readings shall be downlinked in strictly increasing temporal order, with a minimum of 95ms between
	// subsequent measurement times. Downlink packet metadata shall be in increasing temporal order, and all readings
	// within a packet shall fall within the metadata range.
	ReqOrderedMagReadings = "ReqOrderedMagReadings"
	// ReqCorrectMagReadings requires:
	// Every magnetometer reading packet shall downlink exactly the set of readings actually collected during the
	// time range defined in its metadata.
	ReqCorrectMagReadings = "ReqCorrectMagReadings"
	// ReqBatchedMagReadings requires:
	// The flight software shall not downlink magnetometer readings more frequently than once every five seconds.
	ReqBatchedMagReadings = "ReqBatchedMagReadings"
	// ReqNoTelemErrs requires:
	// The flight software shall not downlink any telemetry sequences containing validation errors.
	ReqNoTelemErrs = "ReqNoTelemErrs"
	// ReqTelemOrdered requires:
	// The telemetry packets received shall be in monotonically increasing temporal order. Identical timestamps are
	// acceptable.
	ReqTelemOrdered = "ReqTelemOrdered"
	// ReqTelemRecent requires:
	// Every downlinked telemetry packet shall have a remote timestamp within the last 20ms.
	ReqTelemRecent = "ReqTelemRecent"
	// ReqCmdSuccess requires:
	// Every command shall succeed.
	ReqCmdSuccess = "ReqCmdSuccess"
	// ReqHeartbeat requires:
	// The flight software shall downlink a heartbeat at least once every 150 milliseconds period after time clock
	// initialization occurs.
	ReqHeartbeat = "ReqHeartbeat"
)
View Source
const (
	MaxMagMeasTimeVariance = 500 * time.Microsecond
)

Variables

This section is empty.

Functions

func MakeActivityVerifier

func MakeActivityVerifier(sim model.SimContext, onFailure func(explanation string), logPath string) collector.ActivityCollector

Types

type CommandUplinkEvent

type CommandUplinkEvent struct {
	SendTimestamp    model.VirtualTime
	ReceiveTimestamp model.VirtualTime
	Command          transport.Command
}

func (CommandUplinkEvent) Timestamp

func (e CommandUplinkEvent) Timestamp() model.VirtualTime

type Event

type Event interface {
	Timestamp() model.VirtualTime
}

type MagnetometerMeasureEvent

type MagnetometerMeasureEvent struct {
	X, Y, Z       int16
	MeasTimestamp model.VirtualTime
}

func (MagnetometerMeasureEvent) Timestamp

type MagnetometerPowerEvent

type MagnetometerPowerEvent struct {
	Powered         bool
	ActionTimestamp model.VirtualTime
}

func (MagnetometerPowerEvent) Timestamp

type ReqTracker

type ReqTracker struct {
	// contains filtered or unexported fields
}

func MakeReqTracker

func MakeReqTracker(ctx model.SimContext) *ReqTracker

func (*ReqTracker) CountSuccesses

func (rt *ReqTracker) CountSuccesses() (n int)

func (*ReqTracker) ExplainFailure

func (rt *ReqTracker) ExplainFailure() string

func (*ReqTracker) Failed

func (rt *ReqTracker) Failed() bool

func (*ReqTracker) Immediate

func (rt *ReqTracker) Immediate(req string, success bool)

func (*ReqTracker) LogToPath

func (rt *ReqTracker) LogToPath(outputPath string)

func (*ReqTracker) Retroactive

func (rt *ReqTracker) Retroactive(req string, success bool, time model.VirtualTime)

func (*ReqTracker) Start

func (rt *ReqTracker) Start(req string) (complete func(success bool))

func (*ReqTracker) StartRetro

func (rt *ReqTracker) StartRetro(req string) (complete func(success bool, time model.VirtualTime))

func (*ReqTracker) Subscribe

func (rt *ReqTracker) Subscribe(callback func()) (cancel func())

type TelemetryDownlinkEvent

type TelemetryDownlinkEvent struct {
	RemoteTimestamp model.VirtualTime
	LocalTimestamp  model.VirtualTime
	Telemetry       transport.Telemetry
}

func (TelemetryDownlinkEvent) String

func (e TelemetryDownlinkEvent) String() string

func (TelemetryDownlinkEvent) Timestamp

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL