Documentation
¶
Index ¶
- Variables
- func GetArmaDir() (string, error)
- func GetDispatcher() *dispatcher.Dispatcher
- func GetModulePath() string
- func RVExtension(output *C.char, outputsize C.size_t, input *C.char)
- func RVExtensionArgs(output *C.char, outputsize C.size_t, input *C.char, argv **C.char, argc C.int)
- func RVExtensionRegisterCallback(fnc C.extensionCallback)
- func RVExtensionVersion(output *C.char, outputsize C.size_t)
- func SetCallbackSinkForTest(sink func(name, function string, data ...string))
- func SetDispatcher(d *dispatcher.Dispatcher)
- func SetVersion(version string)
- func WriteArmaCallback(extensionName string, functionName string, data ...string) (err error)
Constants ¶
This section is empty.
Variables ¶
var Config configStruct = configStruct{}
Config defines how calls to this extension will be handled
Functions ¶
func GetArmaDir ¶
GetArmaDir returns the Arma 3 executable directory. It will not account for symlinks.
func GetDispatcher ¶
func GetDispatcher() *dispatcher.Dispatcher
GetDispatcher returns the configured dispatcher, or nil if not set
func GetModulePath ¶
func GetModulePath() string
GetModulePath returns the absolute path to the DLL or SO file this runtime was loaded from
func RVExtension ¶
called by Arma when in the format of: "extensionName" callExtension "command"
func RVExtensionArgs ¶
called by Arma when in the format of: "extensionName" callExtension ["command", ["data"]]
func RVExtensionRegisterCallback ¶
func RVExtensionRegisterCallback(fnc C.extensionCallback)
RVExtensionRegisterCallback registers the callback function that will be called when WriteArmaCallback is called
func RVExtensionVersion ¶
called by Arma to get the version of the extension
func SetCallbackSinkForTest ¶
SetCallbackSinkForTest installs a hook that receives WriteArmaCallback invocations instead of forwarding them to the registered C callback. Pass nil to restore the C callback path. Intended for tests only.
func SetDispatcher ¶
func SetDispatcher(d *dispatcher.Dispatcher)
SetDispatcher sets the event dispatcher for handling commands
func SetVersion ¶
func SetVersion(version string)
SetVersion sets the version string that will be returned when the extension is first called by Arma
Types ¶
This section is empty.