fjage | Framework for Java and Groovy Agents | Runtime Evironment library

 by   org-arl Java Version: 1.12.2 License: Non-SPDX

kandi X-RAY | fjage Summary

kandi X-RAY | fjage Summary

fjage is a Java library typically used in Server, Runtime Evironment applications. fjage has no bugs, it has no vulnerabilities, it has build file available and it has low support. However fjage has a Non-SPDX License. You can install using 'pip install fjage' or download it from GitHub, PyPI.

fjåge provides a lightweight and easy-to-learn framework for [agent-oriented software development] in Java and Groovy. Although most of the functionality of the framework can be used in pure-Java projects, the adoption of Groovy in the project simplifies development immensely. Typically, initialization scripts, shell interaction and command scripts are written in Groovy. Agents and support classes may be written in Java or Groovy.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fjage has a low active ecosystem.
              It has 21 star(s) with 10 fork(s). There are 11 watchers for this library.
              There were 5 major release(s) in the last 12 months.
              There are 40 open issues and 107 have been closed. On average issues are closed in 132 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of fjage is 1.12.2

            kandi-Quality Quality

              fjage has 0 bugs and 0 code smells.

            kandi-Security Security

              fjage has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              fjage code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              fjage has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              fjage releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              fjage saves you 50305 person hours of effort in developing the same functionality from scratch.
              It has 61895 lines of code, 1138 functions and 265 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed fjage and discovered the below as its top functions. This is intended to give you an instant insight into fjage implemented functionality, and help decide if they suit your requirements.
            • Initializes the agent
            • Handles a getFile request
            • Handle a put file request
            • Handle a shell command
            • Creates a new type adapter for the given Gson object
            • Puts a new value into the map
            • Returns the value associated with a key
            • Get documentation by keyword
            • Gets index
            • Initializes the console
            • Store an object
            • Waits for a response to complete
            • Initialize the container
            • Creates a new type adapter for the given type
            • Sets the cloner to use
            • Format a LogRecord
            • Initialize the groovy shell
            • Starts the output stream
            • Performs action
            • Initialize web socket
            • The main thread
            • Creates a type adapter for the given type
            • Runs the serial port
            • Entry point for the application
            • Start the agent
            • Returns a string representation of this object
            Get all kandi verified functions for this library.

            fjage Key Features

            No Key Features are available at this moment for fjage.

            fjage Examples and Code Snippets

            No Code Snippets are available at this moment for fjage.

            Community Discussions

            QUESTION

            Creating a communication between client and server node in unetstack using UnetSocket
            Asked 2021-Apr-28 at 06:25

            I am new to this domain of UnetStack and would appreciate help from the experts.

            I have created a small network of 4 nodes. I am trying to connect my client node, e.g. node B, to the server node (A). I tried the communication between them through the shell. I was successful in it. But I am facing errors when I tried the same through agents. Basically, my client agent holds socket code for the client and the same case is for my server. My aim is to make fully functional communication between client and server nodes.

            I created a server agent, and the client agent added those agents to the respective stacks of nodes. In the above-mentioned agents, I tried to implement my server socket code and client socket code in the respective agent's .groovy file. The server agent is added in the setup file named setup1.groovy while the Client agent is added in the setup2.groovy. The path to these respective files is mentioned in the respective node's stack section in the simulation script. But still, I am facing the following error:

            ...

            ANSWER

            Answered 2021-Apr-28 at 06:25

            The important part of the error you are seeing is

            Source https://stackoverflow.com/questions/67294584

            QUESTION

            How to dynamically calculate path for Node (USV) for connected 2-UAV which are surveying in orthogonal lawnmower pattern in simulation?
            Asked 2021-Apr-26 at 07:55

            I am writing a simulation script which involves 2-UUV and 1-USV. Both Underwater vehicle doing surveying in orthogonal lawnmower motion model. I would like to stay in the range of both vehicle, so they started at the same origin point. I want to know that How can define USV motion model in such a way that it is always in the communication range of both UUV's for most of the time.

            1. Basically How can I manually provide dynamic path planning/ motion model to USV so that I can communicate to both UUV most of the time ? Is it even possible ? Could someone provide a basic example of this or point me in the right direction ?

            Here is my simulation script :

            ...

            ANSWER

            Answered 2021-Apr-26 at 07:55

            The Unet simulator supports multiple levels of motion models depending on the required complexity in the simulation.

            The NodeInfo agent in each simulated node implements a basic dynamics model. The model is turned on using the mobility flag which can be set in a simulation script or directly on the NodeInfo agent. When mobility is enabled, the agent automatically updates location based on motion parameters such as speed and heading using the simple dynamics model. This can be handy to simulate the motion of a node, for example, an AUV swimming away from an underwater modem.

            We can easily do this by manually updating the parameters of one of the nodes in a simulation. Use the 2-node-network example from Unet IDE. The "Map" view of the IDE is handy to visualize the motion of nodes. Connect to the WebShell of Node A and set the mobility, heading, and speed parameters. As the simulation continues the location of Node A will continue to be updated based on the speed and heading.

            Source https://stackoverflow.com/questions/67156178

            QUESTION

            Exception in simulator agent when implementing localization algorithm
            Asked 2021-Apr-01 at 17:06

            I have implemented a localization algorithm with 4 nodes topology and it is working fine but in the log file I am getting this error and I am not able to understand where the problem is. The algorithm gets stuck for sometime and this error appears and after that it again resumes the normal flow.how to remove this error ?

            ...

            ANSWER

            Answered 2021-Apr-01 at 17:06

            I ran your simulation using the code you provided and managed to reproduce the error. Tracing through the logs, I found that the error occurred on the third motion update for node B, whereas your simulation script only seemed to have 2 legs in the motion model. That gave me a hint as to what the problem was.

            Your motion model states:

            Source https://stackoverflow.com/questions/66845758

            QUESTION

            Response to Remote access to Unet Agents for GNURadio
            Asked 2021-Mar-12 at 03:13

            I was wondering what did the Unetstack agent expect as a response to a TCP connection which is established to the modem at ip:port ?

            I was trying to connect to the the modem using the TCP connection through the GNURadio pdu socket. The connection was established but i think after handshaking, it was automatically terminated. Did it expect something ?I am planning to send custom messages to modem using this APIs.

            Here is what i have done so far.

            1. I opened a TCP connection using Socket PDU block using below flow graph.

            1. I used unet audio SDOAM to test:
            ...

            ANSWER

            Answered 2021-Mar-12 at 03:13

            The JSON protocol used by UnetStack is from fjåge. The full specification of the protocol can be found here: https://fjage.readthedocs.io/en/latest/protocol.html

            The protocol expects an acknowledgement to the {"alive": true} JSON message within a short timeout (5 seconds). If it receives no acknowledgement, it will close the connection, assuming that the connecting party is not responsive. The correct acknowledgement is a {"alive": true} sent back to confirm that the connection is indeed alive.

            The above handshake is designed to cater for other transports such as RS232 where a disconnection can only be detected by communicating over the connection.

            Source https://stackoverflow.com/questions/66576441

            QUESTION

            How to handle collision for response of a broadcast request?
            Asked 2021-Feb-13 at 14:35

            I am trying to get coordinates from the neighbouring nodes using a broadcast request and store them into lists. I am able to get only one of the responses and I think this happened because of collision between the responses as the nodes have responded at the same time. I have tried to use the Backoff Behavior with random backoff on the agent of neighbouring node but it didn't solved the problem. How can I sync the mechanism to avoid the collision ? I have written an agent for each blind node (which will make the broadcast request) and the neighbouring nodes.

            Following are the code snippets.

            Agent on blind node:

            ...

            ANSWER

            Answered 2021-Feb-13 at 14:35

            I've simplified your agents and made a working example. The anchor discovery is broken into 2 phases: (1) to find what anchors are around, and (2) get their locations. The reason to break it up is that you want the initial discovery to require minimum channel access to reduce chance of collisions. The later location request can be better controlled once you know what nodes are around.

            I have combined the agents into a single simulation script, so you can simply copy the code in a file and run it:

            Source https://stackoverflow.com/questions/66144047

            QUESTION

            Setting physical channel parameters from an agent
            Asked 2020-Nov-26 at 01:00

            In the startup method of my agent I get the agent ID of the physical agent as:
            phy = agentForService(Services.PHYSICAL)

            Then I have tried different ways to set the powerLevel but usually something like:
            phy.send(new ParameterReq().set(PhysicalChannelParam.powerLevel, -20))
            phy.send(new ParameterReq().set(PhysicalChannelParam.powerLevel, [-20 -20 -20])) phy.set(PhysicalChannelParam.powerLevel, [-20 -20 -20]

            Neither of them works.
            I guess this is because there are multiple physical channels (CONTROL, DATA).
            How do I specify which channel type to change the power level of?

            EDIT:
            A solution was to apparently to change the parameter directly:
            control_channel = phy[1]
            control_channel.powerLevel = -20
            However, this feels like violating the basic ideas behind Fjåge.

            ...

            ANSWER

            Answered 2020-Nov-26 at 01:00

            The phy[1].powerLevel = -20 syntax is just a syntactic sugar for roughly this:

            Source https://stackoverflow.com/questions/65006976

            QUESTION

            How to write Modem Drivers for non-subnero modems?
            Asked 2020-Nov-25 at 11:28

            How can i use the existing modems which is not subnero with UnetStack (basically is not support UnetStack natively) ? I was gone through the post in detailed, but unfortunately had bad compilation issues. Can anyone point me to right direction ?

            Below is the detailed error i encountered:

            ...

            ANSWER

            Answered 2020-Nov-24 at 02:21

            @manuignatius is right, Groovy complains about this when there is a syntax error in a dynamically loaded Groovy class.

            To get a more detailed stack trace on the error, you can manually invoke the Groovy compiler. Set your CLASSPATH environment variable to include all the jars in the lib folder in your local UnetStack installation. Then simply run groovyc MyModemDriver.groovy, and it should show you compilation errors, if any. The compiled .class file that is produced on successful compilation can then be copied to the classes folder in UnetStack/modem instead of the source code.

            Source https://stackoverflow.com/questions/64973662

            QUESTION

            Remote access to Unet modems using JSON
            Asked 2020-Apr-07 at 04:36

            I'm trying to use the JsonTypeAdapter in a modem to transmit some data from a remote source. The adapter is enabled through the modems startup script (JsonAdapter.enable()), and a TCP connection is established to the modem at port 1100. I follow the "Hello world" example in the Fjåge documentation and send the following JSON to the modem:

            {"action":"send","message":{"clazz":"org.arl.unet.DatagramReq","data":{"data":{"clazz":"[B","data":"aGVsbG8gd29ybGQh"},"msgID":"8152310b-155d-4303-9621-c610e036b373","perf":"REQUEST","recipient":"phy","sender":"MyCustomInterface"}}}

            I've set the logLevel to 'ALL' and can see that I get an incoming TCP connection in the log, but no data is being transmitted by the modem. I'm subscribing to the physical agent but am not getting any notifications in the WebShell (using UnetSocket works fine though).

            I'm guessing that either the JsonAdapter isn't active on this TCP connection, the JSON string is faulty or not being sent properly by my application, or something else that I've missed.

            ...

            ANSWER

            Answered 2020-Apr-07 at 04:36

            I copied any pasted your JSON message, and it worked perfectly fine for me. Steps I took:

            1. I used unet audio SDOAM to test:

            Source https://stackoverflow.com/questions/61064709

            QUESTION

            How to connect a Python UnetSocket to an Agent that I have created using agentForService?
            Asked 2020-Mar-31 at 15:59

            I am trying to make a link between a Python script and a simulation running on UnetSim. I want to send messages from Python and receive them in UnetStack using a Python_Agent.groovy that I created and added to container of each node in the simulation. I also want to do the reverse.

            I used the fjage documentation (https://buildmedia.readthedocs.org/media/pdf/fjage/dev/fjage.pdf) to help me. The problem is that in gateway class Services there is not the PYTHON_AGENT Service that I created. I can understand that as my enum Services does not modified class Services where there are NODE_INFO, PHYSICAL etc... My question is then how the example in the documentation 1.6.3 works ? And is it applicable to my case ?

            Here is my code :

            PythonSocketExample.py

            ...

            ANSWER

            Answered 2020-Feb-28 at 05:57

            A few problems in your original code:

            1. You don't need to create a service, since you can address the agent by its name. This should be sufficient for your example here.
            2. To process a request (DatagramReq from your Python code), you should override the processRequest() method in the agent.

            Here's a simplified example based on your original code:

            PythonAgent.groovy:

            Source https://stackoverflow.com/questions/60437685

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fjage

            You can install using 'pip install fjage' or download it from GitHub, PyPI.
            You can use fjage like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the fjage component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            [Release Notes](ReleaseNotes.md)[Getting Started](https://fjage.readthedocs.io/en/latest/quickstart.html)[Developer’s Guide](https://fjage.readthedocs.io/en/latest/)[API documentation](http://org-arl.github.io/fjage/javadoc/)
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i fjage

          • CLONE
          • HTTPS

            https://github.com/org-arl/fjage.git

          • CLI

            gh repo clone org-arl/fjage

          • sshUrl

            git@github.com:org-arl/fjage.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link