Commit 6c448913 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: Started working on scripts and folde structure make

parent 92e725dc
all:
mkdir -p pts-conv-ttl-rs485/boot
mkdir -p pts-conv-ttl-rs485/tests
mkdir -p pts-conv-ttl-rs485/lib
cp -r shell/ pts-conv-ttl-rs485/
wget -P pts-conv-ttl-rs485/boot http://www.ohwr.org/attachments/download/3639/pts.bit
cp pts.py pts-conv-ttl-rs485
cp jpts.py pts-conv-ttl-rs485
cp leds.py pts-conv-ttl-rs485/tests/test00.py
This diff is collapsed.
##_______________________________________________________________________________________________
##
## CONV-TTL-RS485 PTS
##
## CERN,BE/CO-HT
##_______________________________________________________________________________________________
##
##-----------------------------------------------------------------------------------------------
##
## CONV-TTL-RS485 LEDs test
##
##-----------------------------------------------------------------------------------------------
##
## Description Testing of the Front Panel status LEDs (IC1 and bi-color LEDs) and pulse
## LEDs (IC5 and channel LEDs) of the CONV-TTL-BLO board.
##
## For this test, the operator's intervention is needed; when prompted, the operator
## needs to visually check the LEDS.
##
## The FPGA firmware sequences through each of the front panel LEDs (pulse LEDs
## status LEDs) based on the value of the current test field in the PTS control
## register. In order to start and stop LED sequencing, the test sets and clears
## control bits in the PTS CSR.
##
## Authors Julian Lewis (Julian.Lewis@cern.ch)
## Theodor-Adrian Stana (t.stana@cern.ch)
## Website http://www.ohwr.org/projects/pts
## Date 30/10/2014
##-----------------------------------------------------------------------------------------------
##
##------------------------------------------------------------------------------------------------
## GNU LESSER GENERAL PUBLIC LICENSE
## ------------------------------------
## This source file is free software; you can redistribute it and/or modify it under the terms of
## the GNU Lesser General Public License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
## This source is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
## without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU Lesser General Public License for more details.
## You should have received a copy of the GNU Lesser General Public License along with this
## source; if not, download it from http://www.gnu.org/licenses/lgpl-2.1.html
##-------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
## Import
##-------------------------------------------------------------------------------------------------
# Import system modules
import sys
import time
import os, errno, re, sys, struct
import os.path
import traceback
# Import common modules
from ctypes import *
from ptsexcept import *
from vv_pts import *
from pts_memmap import *
##-------------------------------------------------------------------------------------------------
## main --
##-------------------------------------------------------------------------------------------------
def main(bus,tname,inf,log):
"""
tests : Front Panel LEDs with Schmitt trigger driver ICxxx, bicolor LEDs with transceiver ICxx
"""
pel = PTS_ERROR_LOGGER(inf,log)
try:
# First phase of LED test, enable pulse LED sequencing
bus.vv_write(CSR, 1 << CSR_PULSE_LED_EN_OFS)
# The firmware should blink the LEDs, ask the operator for input
inp = raw_input("--> Are the channel LEDs blinking one by one? yes/no: ")
while True:
if inp.find("yes") != -1 or inp.find("YES") != -1:
break
if inp.find("no") != -1 or inp.find("NO") != -1:
msg = "ERROR: Front Panel LEDs or Schmitt trigger IC5"
pel.set(msg)
break
inp = raw_input('Please type "yes" or "no" to continue:')
# Second phase of LED test, enable status LED sequencing
bus.vv_write(CSR, 1 << CSR_STAT_LED_EN_OFS)
# The firmware should blink the LEDs, ask the operator for input
inp = raw_input("--> Are the status LEDs blinking one by one? yes/no: ")
while True:
if inp.find("yes") != -1 or inp.find("YES") != -1:
break
if inp.find("no") != -1 or inp.find("NO") != -1:
msg = "ERROR: Status LEDs or transceiver IC1"
pel.set(msg)
break
inp = raw_input('Please type "yes" or "no" to continue:')
return pel.get()
except BusException, e:
raise PtsError("SKT Exception: %s" % (e))
except BusWarning, e:
raise PtsError("SKT Warning: %s" % (e))
iso.3.6.1.4.1.37968.1.1.5.2.1.3.1 = INTEGER: 15100
iso.3.6.1.4.1.37968.1.1.5.2.1.3.2 = INTEGER: 15100
iso.3.6.1.4.1.37968.1.1.5.2.1.3.3 = INTEGER: 0
iso.3.6.1.4.1.37968.1.1.5.2.1.3.4 = INTEGER: 0
This diff is collapsed.
#!/bin/bash
echo Get ELMA fan speeds and store them in log/fan-speeds
rm -f ../log/fan-speeds
snmpwalk -v2c -c Gr@nBr@st0 cfvm-864-celma1 1.3.6.1.4.1.37968.1.1.5.2.1.3 > ../log/fan-speeds
#!/bin/bash
echo Power OFF ELMA crate
snmpset -v2c -c Gr@nBr@st0 cfvm-864-celma1 1.3.6.1.4.1.37968.1.1.7.2.1.3.1 i 1
#!/bin/bash
echo Power ON ELMA crate
snmpset -v2c -c Gr@nBr@st0 cfvm-864-celma1 1.3.6.1.4.1.37968.1.1.7.2.1.3.1 i 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment