Based on:
http://www.regnumelectronic.com/Docs/PID.pdf (Standard Independent Type C)
170363
function PIDController(options)
{
    // Options configuration
    this.opts       = {
        Kp         : 1.0,
        Ki         : 0.0,
        Kd         : 0.0,
        round      : true,
        Ts         : 1000,  // In MS. (Old sampleTime)
        uMin       : 0,
        uMax       : 255
    };

    options         = options || {};
    this.opts       = extend({}, this.opts, options);

    // Internal Use variables
    this.input           = function ()
    {
        // Function (Reading from sensor)
        this.setIVal(0);
    };

    this.direction       = 0;     // 0 = forward, 1 = drop down to and go forward, 3 = reverse
    this.duration        = 1;     // In seconds (How long to run - 0 = infinite)

    this.output          = function (val)
    {
        // Function (Writing to device)
        return val;
    };

    this.e          = [0.00, 0.00];
    this.PV         = [0.00, 0.00, 0.00];
    this.CO         = [0.00, 0.00];
    this.interval   = 0;
    this.iVal       = 0;
    this.running    = false;
    this.startTime  = 0;
    this.duration   = 0;
    this.SP         = 0;
    this.t1         = 0;
    this.timeLeft   = 0;
    this.tReached   = false;

    EventEmitter.call(this);
}
1226214
def pid(self):
        """"""
        # Support for pexpect's functionality.
        if hasattr(self.subprocess, 'proc'):
            return self.subprocess.proc.pid
        # Standard subprocess method.
        return self.subprocess.pid
740339
def is_valid_pid_to_be_updated(did):
    """"""
    if not d1_gmn.app.did.is_valid_pid_to_be_updated(did):
        raise d1_common.types.exceptions.InvalidRequest(
            0,
            'Object cannot be updated because the identifier for the object to be '
            'updated is {}. did="{}"'.format(
                d1_gmn.app.did.classify_identifier(did), did
            ),
            identifier=did,
        )
627670
def decode_devid(devid, pname):
    ''''''
    devid = int(devid)
    if devid == 0:
        return

    bus_type=devid & 0x07
    bus=(devid>>3) & 0x1F
    address=(devid>>8)&0xFF
    devtype=(devid>>16)

    bustypes = {
        1: "I2C",
        2: "SPI",
        3: "UAVCAN",
        4: "SITL"
        }

    compass_types = {
        0x01 : "DEVTYPE_HMC5883_OLD",
        0x07 : "DEVTYPE_HMC5883",
        0x02 : "DEVTYPE_LSM303D",
        0x04 : "DEVTYPE_AK8963 ",
        0x05 : "DEVTYPE_BMM150 ",
        0x06 : "DEVTYPE_LSM9DS1",
        0x08 : "DEVTYPE_LIS3MDL",
        0x09 : "DEVTYPE_AK09916",
        0x0A : "DEVTYPE_IST8310",
        0x0B : "DEVTYPE_ICM20948",
        0x0C : "DEVTYPE_MMC3416",
        0x0D : "DEVTYPE_QMC5883L",
        0x0E : "DEVTYPE_MAG3110",
        0x0F : "DEVTYPE_SITL",
        0x10 : "DEVTYPE_IST8308",
        0x11 : "DEVTYPE_RM3100",
        }

    imu_types = {
        0x09 : "DEVTYPE_BMI160",
        0x10 : "DEVTYPE_L3G4200D",
        0x11 : "DEVTYPE_ACC_LSM303D",
        0x12 : "DEVTYPE_ACC_BMA180",
        0x13 : "DEVTYPE_ACC_MPU6000",
        0x16 : "DEVTYPE_ACC_MPU9250",
        0x17 : "DEVTYPE_ACC_IIS328DQ",
        0x21 : "DEVTYPE_GYR_MPU6000",
        0x22 : "DEVTYPE_GYR_L3GD20",
        0x24 : "DEVTYPE_GYR_MPU9250",
        0x25 : "DEVTYPE_GYR_I3G4250D",
        0x26 : "DEVTYPE_GYR_LSM9DS1",
        0x27 : "DEVTYPE_INS_ICM20789",
        0x28 : "DEVTYPE_INS_ICM20689",
        0x29 : "DEVTYPE_INS_BMI055",
        0x2A : "DEVTYPE_SITL",
        0x2B : "DEVTYPE_INS_BMI088",
        0x2C : "DEVTYPE_INS_ICM20948",
        0x2D : "DEVTYPE_INS_ICM20648",
        0x2E : "DEVTYPE_INS_ICM20649",
        0x2F : "DEVTYPE_INS_ICM20602",
        }

    decoded_devname = ""

    if pname.startswith("COMPASS"):
        decoded_devname = compass_types.get(devtype, "UNKNOWN")

    if pname.startswith("INS"):
        decoded_devname = imu_types.get(devtype, "UNKNOWN")

    print("%s: bus_type:%s(%u)  bus:%u address:%u(0x%x) devtype:%u(0x%x) %s" % (
        pname,
        bustypes.get(bus_type,"UNKNOWN"), bus_type,
        bus, address, address, devtype, devtype, decoded_devname))
57743
def watchdog_pid():
    """"""
    result = sh('netstat -tulpn 2>/dev/null | grep 127.0.0.1:{:d}'
                .format(SPHINX_AUTOBUILD_PORT), capture=True, ignore_error=True)
    pid = result.strip()
    pid = pid.split()[-1] if pid else None
    pid = pid.split('/', 1)[0] if pid and pid != '-' else None

    return pid
1275637
function getByPID(pid) {
  var workers = get();
  var i;
  var worker;

  for (i = 0; i < workers.length; i++) {
    worker = workers[i];
    if (worker.pid === pid) {
      return worker;
    }
  }
  // else return undefined
}
356552
def get_pid(rundir, process_type=PROCESS_TYPE, name=None):
    
    pidPath = get_pidpath(rundir, process_type, name)
    log.log('run', 'pidfile for %s %s is %s' % (process_type, name, pidPath))

    if not os.path.exists(pidPath):
        return

    pidFile = open(pidPath, 'r')
    pid = pidFile.readline()
    pidFile.close()
    if not pid or int(pid) == 0:
        return

    return int(pid)
1011458
def pid_from_context(_, context):
    """"""
    pid = (context or {}).get('pid')
    return pid.pid_value if pid else missing
93777
def systemInformationType2():
    """"""
    a = L2PseudoLength(l2pLength=0x16)
    b = TpPd(pd=0x6)
    c = MessageType(mesType=0x1a)  # 00011010
    d = NeighbourCellsDescription()
    e = NccPermitted()
    f = RachControlParameters()
    packet = a / b / c / d / e / f
    return packet
986046
def systemInformationType7():
    """"""
    a = L2PseudoLength(l2pLength=0x01)
    b = TpPd(pd=0x6)
    c = MessageType(mesType=0x37)  # 000110111
    d = Si7RestOctets()
    packet = a / b / c / d
    return packet
244397
private GVRCursorController getUniqueControllerId(int deviceId) {
        GVRCursorController controller = controllerIds.get(deviceId);
        if (controller != null) {
            return controller;
        }
        return null;
    }
362616
String lookupPid(ConfigID referenceId) {
        ExtendedConfiguration config = caSupport.lookupConfiguration(referenceId);
        String pid = (config == null) ? null : config.getPid();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "lookupPid(): Lookup of " + referenceId + " reference resolved to " + pid);
        }
        return pid;
    }
880382
def chip_id(self):
        
        id0 = self.read_reg(self.ESP_OTP_MAC0)
        id1 = self.read_reg(self.ESP_OTP_MAC1)
        return (id0 >> 24) | ((id1 & MAX_UINT24) << 8)
473208
@Override
  public final void setItsId(final IdUserRoleJetty pId) {
    this.itsId = pId;
    if (this.itsId == null) {
      this.itsUser = null;
      this.itsRole = null;
    } else {
      this.itsUser = this.itsId.getItsUser();
      this.itsRole = this.itsId.getItsRole();
    }
  }
254856
public OtpErlangPid read_pid() throws OtpErlangDecodeException {
        String node;
        int id;
        int serial;
        int creation;
        int tag;

        tag = read1skip_version();

        if (tag != OtpExternal.pidTag &&
	    tag != OtpExternal.newPidTag) {
            throw new OtpErlangDecodeException(
                    "Wrong tag encountered, expected " + OtpExternal.pidTag
		    + " or " + OtpExternal.newPidTag
                            + ", got " + tag);
        }

        node = read_atom();
        id = read4BE();
        serial = read4BE();
	if (tag == OtpExternal.pidTag)
	    creation = read1();
	else
	    creation = read4BE();

        return new OtpErlangPid(tag, node, id, serial, creation);
    }
1351676
def set_id(self,pid):
        
        if self.type == 'KAF':
            return self.node.set('pid',pid)
        elif self.type == 'NAF':
            return self.node.set('id',pid)
1201476
public void write_pid(OtpErlangPid pid) {
	write1(pid.tag());
	write_atom(pid.node());
	write4BE(pid.id());
	write4BE(pid.serial());
	switch (pid.tag()) {
	case OtpExternal.pidTag:
	    write1(pid.creation());
	    break;
	case OtpExternal.newPidTag:
	    write4BE(pid.creation());
	    break;
	default:
	    throw new AssertionError("Invalid pid tag " + pid.tag());
	}
    }