예제 #1
0
def openDSS():
    
    global load1,load2,load3,ph1,ph2,ph3
    a = (807.0 + float(load1)) - (float(ph1))
    b = (973.0 + float(load3)) - (float(ph2))
    c = (1082.0 + float(load2))  - (float(ph3))
    logging.debug('%s : %s : %s : %s : %s :%s : %s : %s :%s ' % (a,b,c,ph1,ph2,ph3,load1,load2,load3))
    update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % (time.time(),es_ID,a,b,c)
    logging.debug('sending to pipe %s'%update)
    pipe.send_sync_event(update.encode('UTF-8'),pipin)
예제 #2
0
def openDSS(info):
    line=info.split()
    time_sent = float(line[3])
    ph1 = line[0]
    ph2 = line[1]
    ph3 = line[2]
    if time.time() - time_sent > 1.0:
        pass
    else:
        update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % (time.time(),es_ID,ph1,ph2,ph3)
        logging.debug('sending to pipe')
        pipe.send_sync_event(update.encode('UTF-8'),pipin)
예제 #3
0
def openDSS():

    global load1, load2, load3, ph1, ph2, ph3
    a = (807.0 + float(load1)) - (float(ph1))
    b = (973.0 + float(load3)) - (float(ph2))
    c = (1082.0 + float(load2)) - (float(ph3))
    logging.debug('%s : %s : %s : %s : %s :%s : %s : %s :%s ' %
                  (a, b, c, ph1, ph2, ph3, load1, load2, load3))
    update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % (
        time.time(), es_ID, a, b, c)
    logging.debug('sending to pipe %s' % update)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #4
0
def openDSS(info):
    line = info.split()
    time_sent = float(line[3])
    ph1 = line[0]
    ph2 = line[1]
    ph3 = line[2]
    if time.time() - time_sent > 1.0:
        pass
    else:
        update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % (
            time.time(), es_ID, ph1, ph2, ph3)
        logging.debug('sending to pipe')
        pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #5
0
def request_data():
    update = ('update b p pre_pmu post_pmu %s a1 0\n'% time.time())
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #6
0
def get_val():
    update = 'update b p pre_gen_report post_gen_report %s %s 1 mon_wind_gen\n' %(time.time(),Gen_ID)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #7
0
파일: gen.py 프로젝트: JinLabIIT/EmbVT
def get_val():
    update = 'update b p monitor_1 post_monitor_1 %s %s 1 mon_wind_gen\n' %(time.time(),Gen_ID)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #8
0
def send_netCoord(val1, val2, val3):
    update = 'update b p storage post_storage %s %s 3 %s %s %s\n' % (
        time.time(), Es_ID, val1, val2, val3)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #9
0
def send_netCoord():
    update = 'update n p fault post_fault %s %s 3 1 b24 a\n' %(time.time(),Fault_ID)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #10
0
파일: gen.py 프로젝트: yuanzy97/DSSnet
def send_netCoord(val):
    update = 'update n p controllable_generator post_controllable_generator %s %s 1 %s\n' % (
        time.time(), Gen_ID, val)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #11
0
파일: master.py 프로젝트: JinLabIIT/EmbVT
def postprocess_event(event):
    pipe.send_sync_event('%s \n' % event, pipe_host)
예제 #12
0
파일: gen.py 프로젝트: annonch/DSSnet
def send_netCoord(val):
    update = 'update n p controllable_generator post_controllable_generator %s %s 1 %s\n' %(time.time(),Gen_ID, val)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #13
0
파일: load.py 프로젝트: annonch/DSSnet
def send_netCoord(val):
    update = 'update n p controllable_load post_controllable_load %s %s 1 %s\n' %(time.time(),Load_ID, val)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #14
0
파일: es.py 프로젝트: annonch/DSSnet
def send_netCoord(val1, val2, val3):
    update = 'update b p storage post_storage %s %s 3 %s %s %s\n' %(time.time(),Es_ID, val1, val2, val3)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #15
0
def get_val():
    update = 'update b p pre_load_report post_load_report %s %s 0\n' % (
        time.time(), Load_ID)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #16
0
파일: mon1.py 프로젝트: yuanzy97/DSSnet
def send_netCoord():
    update = 'update b p monitor_1 post_monitor_1 %s %s 0 \n' %(time.time(),Mon_ID)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #17
0
def get_val():
    update = 'update b p pre_gen_report post_gen_report %s %s 1 mon_wind_gen\n' % (
        time.time(), Gen_ID)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #18
0
파일: load.py 프로젝트: yuanzy97/DSSnet
def send_netCoord(val):
    update = 'update n p controllable_load post_controllable_load %s %s 1 %s\n' % (
        time.time(), Load_ID, val)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)
예제 #19
0
파일: load.py 프로젝트: annonch/DSSnet
def get_val():
    update = 'update b p get_load_value post_get_load_value %s %s 0\n' %(time.time(),Load_ID)
    pipe.send_sync_event(update.encode('UTF-8'), pipin)