a3interface

package
v5.0.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config configStruct = configStruct{}

Config defines how calls to this extension will be handled

Functions

func GetArmaDir

func GetArmaDir() (string, error)

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

func RVExtension(output *C.char, outputsize C.size_t, input *C.char)

called by Arma when in the format of: "extensionName" callExtension "command"

func RVExtensionArgs

func RVExtensionArgs(output *C.char, outputsize C.size_t, input *C.char, argv **C.char, argc C.int)

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

func RVExtensionVersion(output *C.char, outputsize C.size_t)

called by Arma to get the version of the extension

func SetCallbackSinkForTest

func SetCallbackSinkForTest(sink func(name, function string, data ...string))

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

func WriteArmaCallback

func WriteArmaCallback(
	extensionName string,
	functionName string,
	data ...string,
) (
	err error,
)

WriteArmaCallback takes a function name designation and a series of arguments that it will parse into an array and send to Arma

Types

This section is empty.

Jump to

Keyboard shortcuts

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