• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

WindhoverLabs / yamcs-cfs / #162

28 Nov 2024 05:03PM UTC coverage: 0.0%. Remained the same
#162

push

lorenzo-gomez-windhover
-Updates for yamcs 5.9.8

0 of 4 new or added lines in 1 file covered. (0.0%)

614 existing lines in 11 files now uncovered.

0 of 6789 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/windhoverlabs/yamcs/cfs/registry/CfsRegistryService.java
1
package com.windhoverlabs.yamcs.cfs.registry;
2

3
import static org.yamcs.parameter.SystemParametersService.getPV;
4
import static org.yamcs.xtce.NameDescription.qualifiedName;
5
import static org.yamcs.xtce.XtceDb.YAMCS_SPACESYSTEM_NAME;
6

7
import com.windhoverlabs.yamcs.util.CfsPlugin;
8
import java.util.ArrayList;
9
import java.util.Collection;
10
import java.util.List;
11
import org.yamcs.AbstractYamcsService;
12
import org.yamcs.InitException;
13
import org.yamcs.PluginManager;
14
import org.yamcs.YConfiguration;
15
import org.yamcs.YamcsServer;
16
import org.yamcs.mdb.Mdb;
17
import org.yamcs.parameter.ParameterValue;
18
import org.yamcs.parameter.SystemParametersProducer;
19
import org.yamcs.parameter.SystemParametersService;
20
import org.yamcs.protobuf.Yamcs.Value.Type;
21
import org.yamcs.xtce.Parameter;
22
import org.yamcs.xtce.XtceDb;
23

UNCOV
24
public class CfsRegistryService extends AbstractYamcsService implements SystemParametersProducer {
×
25

26
  private Parameter workspaceDirParam;
27
  //  private AggregateParameterType spWorkspaceHKType; // Housekeeping info for the workspace.
28
  // Can't be as easily done after YAMCS Version 5.8.8. Need to write types to a writeable
29
  // namespace.
30
  // https://github.com/yamcs/yamcs/commit/7abba0a93013e8b4ec1020be3df592191614da33
31
  //  private AggregateParameterType spWorkspaceHKType; // Housekeeping info for the workspace.
32
  private XtceDb mdb;
33

34
  @Override
35
  public void init(String yamcsInstance, String serviceName, YConfiguration config)
36
      throws InitException {
UNCOV
37
    super.init(yamcsInstance, serviceName, config);
×
UNCOV
38
  }
×
39

40
  @Override
41
  protected void doStart() {
42
    setupSystemParameters();
×
UNCOV
43
    notifyStarted();
×
UNCOV
44
  }
×
45

46
  @Override
47
  public Collection<ParameterValue> getSystemParameters(long gentime) {
48
    List<ParameterValue> pvlist = new ArrayList<>();
×
49

UNCOV
50
    PluginManager pluginManager = YamcsServer.getServer().getPluginManager();
×
51
    CfsPlugin plugin = pluginManager.getPlugin(CfsPlugin.class);
×
52

UNCOV
53
    pvlist.add(getPV(workspaceDirParam, gentime, plugin.getWorkspaceDir()));
×
54
    return pvlist;
×
55
  }
56

57
  void setupSystemParameters() {
UNCOV
58
    mdb = YamcsServer.getServer().getInstance(yamcsInstance).getMdb();
×
59
    SystemParametersService collector = SystemParametersService.getInstance(yamcsInstance);
×
60
    if (collector != null) {
×
UNCOV
61
      makeParameterStatus();
×
62

63
      workspaceDirParam =
×
64
          ((Mdb) mdb)
UNCOV
65
              .createSystemParameter(
×
UNCOV
66
                  qualifiedName(YAMCS_SPACESYSTEM_NAME, "Registry/Workspace"),
×
67
                  collector.getBasicType(Type.STRING),
×
68
                  "Current configuration of registry.");
69

70
      collector.registerProducer(this);
×
71
    }
72
  }
×
73

74
  private void makeParameterStatus() {
75
    // TODO Implement
76

UNCOV
77
  }
×
78

79
  @Override
80
  protected void doStop() {
UNCOV
81
    notifyStopped();
×
UNCOV
82
  }
×
83
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc