Skip to content

scientific-software-hub/virtual-tango-host

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

virtual Tango host

wakatime

Usage

  1. Start a new project

  2. Add dependency to you pom.xml or whatever

    <dependency>
      <groupId>waltz-controls.tango</groupId>
      <artifactId>virtual-tango-host</artifactId>
      <version>0.2</version>
    </dependency>

    The above requires GitHub packages authorization in your settings.xml:

    <servers>
         <server>
           <id>github-waltz</id>
           <username>YOUR_GITHUB_USER</username>
           <password>YOUR_GITHUB_TOKEN</password>
         </server>
    </servers>
    <repositories>
         <!-- this one is for JTango -->
         <repository>
             <snapshots>
                 <enabled>false</enabled>
             </snapshots>
             <id>github-waltz</id>
             <url>https://maven.pkg.github.com/waltz-controls/*</url>
         </repository>
     </repositories>
  3. [Optional] Implement DbBackend

    public class MyDbBackend implements DbBackend{
        //TODO   
    }

    To use simple in-memory backend just provide a .properties file with Tango devices (-DentriesFile=<path-to-file>):

    virtual/test/0=TestServer.class
    virtual/test/1=TestServer.class
    #etc
    
  4. Register your DbBackend in the DbBackendFactory and start the virtual Tango db

     public class Main {
      public static void main(String[] args){
        DbBackendFactory.getInstance().setDbBackendImplementationClass(MyDbBackend.class);
        new DataBase.Launcher().run();
      }
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages