Documentation ¶
Index ¶
- Variables
- type Conn
- func (c *Conn) BindMethod(req *dfproto.CoreBindRequest) (int32, []*dfproto.CoreTextNotification, error)
- func (c *Conn) CheckHashes() ([]*dfproto.CoreTextNotification, error)
- func (c *Conn) Close() error
- func (c *Conn) CoreResume() (int32, []*dfproto.CoreTextNotification, error)
- func (c *Conn) CoreSuspend() (int32, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetBlockList(req *RemoteFortressReader.BlockRequest) (*RemoteFortressReader.BlockList, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetDFVersion() (string, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetGrowthList() (*RemoteFortressReader.MaterialList, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetMapInfo() (*RemoteFortressReader.MapInfo, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetMaterialList() (*RemoteFortressReader.MaterialList, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetPlantList(req *RemoteFortressReader.BlockRequest) (*RemoteFortressReader.PlantList, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetTiletypeList() (*RemoteFortressReader.TiletypeList, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetUnitList() (*RemoteFortressReader.UnitList, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetVersion() (string, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetViewInfo() (*RemoteFortressReader.ViewInfo, []*dfproto.CoreTextNotification, error)
- func (c *Conn) GetWorldInfo() (*dfproto.GetWorldInfoOut, []*dfproto.CoreTextNotification, error)
- func (c *Conn) ListEnums() (*dfproto.ListEnumsOut, []*dfproto.CoreTextNotification, error)
- func (c *Conn) ListJobSkills() (*dfproto.ListJobSkillsOut, []*dfproto.CoreTextNotification, error)
- func (c *Conn) ListMaterials(req *dfproto.ListMaterialsIn) (*dfproto.ListMaterialsOut, []*dfproto.CoreTextNotification, error)
- func (c *Conn) ListSquads(req *dfproto.ListSquadsIn) (*dfproto.ListSquadsOut, []*dfproto.CoreTextNotification, error)
- func (c *Conn) ListUnits(req *dfproto.ListUnitsIn) (*dfproto.ListUnitsOut, []*dfproto.CoreTextNotification, error)
- func (c *Conn) ResetMapHashes() ([]*dfproto.CoreTextNotification, error)
- func (c *Conn) RoundTripBind(command string, plugin *string, in, out string, req, resp proto.Message) ([]*dfproto.CoreTextNotification, error)
- func (c *Conn) RunCommand(req *dfproto.CoreRunCommandRequest) ([]*dfproto.CoreTextNotification, error)
- func (c *Conn) RunLua(req *dfproto.CoreRunLuaRequest) ([]string, []*dfproto.CoreTextNotification, error)
- func (c *Conn) SetUnitLabors(req *dfproto.SetUnitLaborsIn) ([]*dfproto.CoreTextNotification, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidHandshake = errors.New("dfhack: invalid handshake") ErrMessageTooLarge = errors.New("dfhack: message too large") ErrInvalidError = errors.New("dfhack: error code unknown") ErrLinkFailure = errors.New("dfhack: CR_LINK_FAILURE: RPC call failed due to I/O or protocol error") ErrNeedsConsole = errors.New("dfhack: CR_NEEDS_CONSOLE: attempt to call interactive command without console") ErrNotImplemented = errors.New("dfhack: CR_NOT_IMPLEMENTED: command not implemented, or plugin not loaded") ErrFailure = errors.New("dfhack: CR_FAILURE: failure") ErrWrongUsage = errors.New("dfhack: CR_WRONG_USAGE: wrong arguments or ui state") ErrNotFound = errors.New("dfhack: CR_NOT_FOUND: target object not found (for RPC mainly)") )
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) BindMethod ¶
func (c *Conn) BindMethod(req *dfproto.CoreBindRequest) (int32, []*dfproto.CoreTextNotification, error)
RPC BindMethod : CoreBindRequest -> CoreBindReply
func (*Conn) CheckHashes ¶
func (c *Conn) CheckHashes() ([]*dfproto.CoreTextNotification, error)
RPC CheckHashes : EmptyMessage -> EmptyMessage
func (*Conn) Close ¶
3. Disconnect
The client terminates the connection by sending an RPC_REQUEST_QUIT header with zero size and immediately closing the socket.
func (*Conn) CoreResume ¶
func (c *Conn) CoreResume() (int32, []*dfproto.CoreTextNotification, error)
RPC CoreResume : EmptyMessage -> IntMessage
func (*Conn) CoreSuspend ¶
func (c *Conn) CoreSuspend() (int32, []*dfproto.CoreTextNotification, error)
RPC CoreSuspend : EmptyMessage -> IntMessage
func (*Conn) GetBlockList ¶
func (c *Conn) GetBlockList(req *RemoteFortressReader.BlockRequest) (*RemoteFortressReader.BlockList, []*dfproto.CoreTextNotification, error)
RPC GetBlockList : BlockRequest -> BlockList
func (*Conn) GetDFVersion ¶
func (c *Conn) GetDFVersion() (string, []*dfproto.CoreTextNotification, error)
RPC GetDFVersion : EmptyMessage -> StringMessage
func (*Conn) GetGrowthList ¶
func (c *Conn) GetGrowthList() (*RemoteFortressReader.MaterialList, []*dfproto.CoreTextNotification, error)
RPC GetGrowthList : EmptyMessage -> MaterialList
func (*Conn) GetMapInfo ¶
func (c *Conn) GetMapInfo() (*RemoteFortressReader.MapInfo, []*dfproto.CoreTextNotification, error)
RPC GetMapInfo : EmptyMessage -> MapInfo
func (*Conn) GetMaterialList ¶
func (c *Conn) GetMaterialList() (*RemoteFortressReader.MaterialList, []*dfproto.CoreTextNotification, error)
RPC GetMaterialList : EmptyMessage -> MaterialList
func (*Conn) GetPlantList ¶
func (c *Conn) GetPlantList(req *RemoteFortressReader.BlockRequest) (*RemoteFortressReader.PlantList, []*dfproto.CoreTextNotification, error)
RPC GetPlantList : BlockRequest -> PlantList
func (*Conn) GetTiletypeList ¶
func (c *Conn) GetTiletypeList() (*RemoteFortressReader.TiletypeList, []*dfproto.CoreTextNotification, error)
RPC GetTiletypeList : EmptyMessage -> TiletypeList
func (*Conn) GetUnitList ¶
func (c *Conn) GetUnitList() (*RemoteFortressReader.UnitList, []*dfproto.CoreTextNotification, error)
RPC GetUnitList : EmptyMessage -> UnitList
func (*Conn) GetVersion ¶
func (c *Conn) GetVersion() (string, []*dfproto.CoreTextNotification, error)
RPC GetVersion : EmptyMessage -> StringMessage
func (*Conn) GetViewInfo ¶
func (c *Conn) GetViewInfo() (*RemoteFortressReader.ViewInfo, []*dfproto.CoreTextNotification, error)
RPC GetViewInfo : EmptyMessage -> ViewInfo
func (*Conn) GetWorldInfo ¶
func (c *Conn) GetWorldInfo() (*dfproto.GetWorldInfoOut, []*dfproto.CoreTextNotification, error)
RPC GetWorldInfo : EmptyMessage -> GetWorldInfoOut
func (*Conn) ListEnums ¶
func (c *Conn) ListEnums() (*dfproto.ListEnumsOut, []*dfproto.CoreTextNotification, error)
RPC ListEnums : EmptyMessage -> ListEnumsOut
func (*Conn) ListJobSkills ¶
func (c *Conn) ListJobSkills() (*dfproto.ListJobSkillsOut, []*dfproto.CoreTextNotification, error)
RPC ListJobSkills : EmptyMessage -> ListJobSkillsOut
func (*Conn) ListMaterials ¶
func (c *Conn) ListMaterials(req *dfproto.ListMaterialsIn) (*dfproto.ListMaterialsOut, []*dfproto.CoreTextNotification, error)
RPC ListMaterials : ListMaterialsIn -> ListMaterialsOut
func (*Conn) ListSquads ¶
func (c *Conn) ListSquads(req *dfproto.ListSquadsIn) (*dfproto.ListSquadsOut, []*dfproto.CoreTextNotification, error)
RPC ListSquads : ListSquadsIn -> ListSquadsOut
func (*Conn) ListUnits ¶
func (c *Conn) ListUnits(req *dfproto.ListUnitsIn) (*dfproto.ListUnitsOut, []*dfproto.CoreTextNotification, error)
RPC ListUnits : ListUnitsIn -> ListUnitsOut
func (*Conn) ResetMapHashes ¶
func (c *Conn) ResetMapHashes() ([]*dfproto.CoreTextNotification, error)
RPC ResetMapHashes : EmptyMessage -> EmptyMessage
func (*Conn) RoundTripBind ¶
func (*Conn) RunCommand ¶
func (c *Conn) RunCommand(req *dfproto.CoreRunCommandRequest) ([]*dfproto.CoreTextNotification, error)
RPC RunCommand : CoreRunCommandRequest -> EmptyMessage
func (*Conn) RunLua ¶
func (c *Conn) RunLua(req *dfproto.CoreRunLuaRequest) ([]string, []*dfproto.CoreTextNotification, error)
RPC RunLua : CoreRunLuaRequest -> StringListMessage
func (*Conn) SetUnitLabors ¶
func (c *Conn) SetUnitLabors(req *dfproto.SetUnitLaborsIn) ([]*dfproto.CoreTextNotification, error)
RPC SetUnitLabors : SetUnitLaborsIn -> EmptyMessage
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package RemoteFortressReader is a generated protocol buffer package.
|
Package RemoteFortressReader is a generated protocol buffer package. |
Package dfproto is a generated protocol buffer package.
|
Package dfproto is a generated protocol buffer package. |