smsconfig

package
v0.0.0-...-fab4774 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(workingdir string)

load the config utilizing viper

Types

type ModemType

type ModemType int

modem type

const (
	SERIAL ModemType = iota
	ADB
)
two available modem types for the beginning

* 1. serial (USB-Stick) * 2. Android developer interface

type SMSConfig

type SMSConfig struct {
	ServerAddress  string      // server address
	ServerPort     string      // server port
	Retries        int         // how many retries after fail. serial
	Buffersize     int         // buffer size for serial
	BufferLow      int         // buffer low for serial
	MSGTimeOut     int         // message time out serial
	MSGTimeOutLong int         // message time out for long term
	Devices        []SMSDevice //devices
}

config object

var SMSConfiguration *SMSConfig = &SMSConfig{
	ServerAddress:  "0.0.0.0",
	ServerPort:     "1712",
	Retries:        5,
	Buffersize:     10,
	BufferLow:      4,
	MSGTimeOut:     10,
	MSGTimeOutLong: 20,
	Devices:        nil,
}

default server settings

type SMSDevice

type SMSDevice struct {
	DeviceType ModemType // device type
	COMPort    string    // comport. not necessary for adb
	Baudrate   int       // baudrate. not needed for adb
	DeviceId   string    // device id for sending data
}

sms device is set as

Jump to

Keyboard shortcuts

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