Recent Changes - Search:
ECG Home

GitHub

People

Publications

Calendar

Projects

Fall 2017

Older Courses

Spring 2017

Fall 2016

Spring 2016

Fall 2015

Spring 2015

Fall 2014

Spring 2014

Fall 2013

Spring 2013

Fall 2012

Spring 2012

Fall 2011

Spring 2011

Fall 2010

Spring 2010

Fall 2009

Spring 2009

Fall 2008

Spring 2008

Fall 2007

HOWTOs

edit SideBar

PS7a

Home Assignments Lecture Blog Resources Discussion Group

Kronos Time Clock: Introduction to Regular Expression Parsing

In this assignment, we begin the analysis of the Kronos InTouch time clock log by using regular expressions to parse the file.

Details

Here is a summary of the whole assignment:

  1. Verify device boot up timing.
  2. Verify device startup services.
  3. Verify device software upgrades.

In this portion of the assignment, we will only be doing (1) boot up timing.

Your job is to read in an entire InTouch log and report:

  • each startup
  • whether it completed
    • if so, how much time it required
  • whether it failed

Your output should begin with the line number of the startup message (log.c.166) server started, the timestamp of the startup, and either: success followed by elapsed time, or failure.

  • Success is determined by a line containing the string oejs.AbstractConnector:Started SelectChannelConnector that follows the startup message.
  • Failure is determined by another startup message before the success message, or end of file.

Each of these output reports should be on a single line.

The whole assignment may be viewed here: Attach:Intouch Startup Log Parsing 2015.pdf

Here is sample code to get you started: Attach:stdin_boost.cpp
The code will read a regex from stdin, and then let you type input strings which are matched against the regex.

Notes

  • While it's possible to do the assignment without the use of regular expressions, the point of this assignment is to learn about regular expressions.
Therefore it is required that you use the C++ regular expression (regex) library.
./ps7a device1_intouch.log

and your code should would produce a file named device1_intouch.log.rpt.

Submit

Submit the following:

  • Your source code .cpp file and any header file(s).
  • A Makefile for building the code.
  • Output from running your code on each of the five InTouch log files. Your output files must be named device[1-5]_intouch.log.rpt.
  • A filled-out copy of the Attach:ps7a-readme.txt file.

Submit as follows:

Grading Rubric

FeatureValueComment
core implementation4full & correct implementation=4 pts; nearly complete=3pts; part way=2 pts; started=1 pt
use of Boost time methods2please use them
output files included2full & correct = 2 pts; partial = 1 pt; absent = 0 pt
Makefile2Makefile included
Readme42 pts for describing regexs in readme; 2 pts for discussion
Total14 
Edit - History - Print - Recent Changes - Search
Page last modified on May 17, 2015, at 11:24 AM