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

WindhoverLabs / yamcs-cfs / #157

25 Nov 2024 11:22PM UTC coverage: 0.0%. Remained the same
#157

push

web-flow
Merge 096a65ddf into e64813ef2

0 of 18 new or added lines in 13 files covered. (0.0%)

1 existing line in 1 file now uncovered.

0 of 6640 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

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 Version 5.8.8. Need to write types to a writeable namespace.
29
  // https://github.com/yamcs/yamcs/commit/7abba0a93013e8b4ec1020be3df592191614da33
30
  //  private AggregateParameterType spWorkspaceHKType; // Housekeeping info for the workspace.
31
  private XtceDb mdb;
32

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

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

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

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

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

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

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

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

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

76
  }
×
77

78
  @Override
79
  protected void doStop() {
80
    notifyStopped();
×
81
  }
×
82
}
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

© 2026 Coveralls, Inc