{"modulePath":"github.com/srcfl/device-simulator","version":"v0.7.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Types\n\n```go\ntype AutomationState struct {\n\tEnabled        bool      `json:\"enabled\"`\n\tTimeMultiplier float64   `json:\"time_multiplier\"`\n\tSimulatedTime  time.Time `json:\"simulated_time\"`\n\tProfile        string    `json:\"profile\"`\n\tUpdateInterval int       `json:\"update_interval_ms\"`\n\t// contains filtered or unexported fields\n}\n```\nAutomationState holds the current automation configuration\n\n```go\ntype Server struct {\n\t// contains filtered or unexported fields\n}\n```\nServer handles HTTP API requests\n\n```go\nfunc NewServer(modbusServer *modbus.Server) *Server\n```\nNewServer creates a new API server\n\n```go\nfunc (s *Server) Handler() http.Handler\n```\nHandler returns the HTTP handler\n\n```go\ntype WriteRequest struct {\n\tValue float64 `json:\"value\"`\n}\n```\nWriteRequest is the request body for writing a register\n\n","path":"github.com/srcfl/device-simulator/internal/api","name":"api","synopsis":"","isRedistributable":true}
