0.0.17 • Published 1 year ago

com.ant-automation.antcity.base.mqttcontroller v0.0.17

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

AntCity MQTTController

Dependencies

GeoUtils Package

Requirements

Usage

  • Attach the 'MqttController' script (located in the "/Runtime/Scripts" folder inside the package) to a GameObject.
  • Set the Broker's URL in the added component.
  • In order to subscribe to a new topic you must call the 'Subscribe()' method, providing the topic name and a CartesianTransform which will transform the simulation coordinates to Unity coordinates (See the GeoUtils Package for more information)

The controller will be processing messages and creating/updating agent information which will be exposed in a public Dictionary called ActiveAgentsPerTopic Each key for this dictionary is one of the subscribed topics and inside contains another dictionary which key is the Agent's Name and the value is that agent's data.

Whenever the MqttController receives new agent data, it will call the 'OnAgentInfoReceived' event with the received agents' info. You can subscribe your components to this event and react to it.

Observations

The JSON deserialization job currently allocates its NativeArrays memory with Allocator.Persistent. Performance could be improved if we can use Allocator.TempJob, but it would require to perform the entire job within 4 frames. It's currently processing it in about 2 to 12 frames (Depending on the message load).

0.0.16

1 year ago

0.0.17

1 year ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago