Ejemplo n.º 1
0
/**
 * Write output from buses to standard out
 * @param string (output) string with information to be printed out
 * @param bufsize size of string buffer in bytes
 * @param signal an optional character string to signal to this
 * routine what about kind of information to write
 * @return true if bus is contributing string to output, false otherwise
 */
bool gridpack::resistor_grid::RGBus::serialWrite(char *string,
    const int bufsize, const char *signal)
{
  if (p_lead) {
    sprintf(string,"Voltage on bus %d: %12.6f (lead)\n",
        getOriginalIndex(),*p_voltage);
  } else {
    sprintf(string,"Voltage on bus %d: %12.6f\n",
        getOriginalIndex(),*p_voltage);
  }
  return true;
}
Ejemplo n.º 2
0
    void ActiveTabsModel::doOpenTab(int index) {
        LOG_INFO << index;
        int originalIndex = getOriginalIndex(index);
        auto *tabsModel = getTabsModel();

        tabsModel->activateTab(originalIndex);
    }
Ejemplo n.º 3
0
    void InactiveTabsModel::doOpenTab(int index) {
        LOG_INFO << index;
        int originalIndex = getOriginalIndex(index);
        auto *tabsModel = getTabsModel();

        tabsModel->escalateTab(originalIndex);
        invalidateFilter();
        emit tabOpened(originalIndex);
    }
Ejemplo n.º 4
0
 bool serialWrite(char *string, const int bufsize, const char *signal) {
   sprintf(string,"  Bus: %4d      %4d\n",getOriginalIndex(),
       getGlobalIndex());
   return true;
 }