From 6454ddc2e20599306edceca0fa16617fcad1d6cd Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 15 Apr 2015 11:38:13 +0200 Subject: Add references --- Main.hs | 39 ++++++++++++++++++--- comatose.cabal | 2 +- data/attribution.bib | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++ data/db.yaml | 59 ++------------------------------ 4 files changed, 134 insertions(+), 62 deletions(-) create mode 100644 data/attribution.bib diff --git a/Main.hs b/Main.hs index 5713b43..6274025 100644 --- a/Main.hs +++ b/Main.hs @@ -4,7 +4,8 @@ import Control.Applicative import Control.Monad import Data.Monoid import Data.Yaml -import Data.List (nub, sort) +import Data.List (nub, sort, sortBy) +import Data.Function (on) import Data.Maybe (catMaybes) import qualified Data.Text as T import Text.BibTeX.Parse @@ -111,7 +112,31 @@ extcss url = link_ [rel_ "stylesheet", type_ "text/css", href_ url] extjs :: T.Text -> Html () extjs url = script_ [type_ "text/javascript", charset_ "utf8", src_ url] ("" :: T.Text) -page db = doctypehtml_ $ do +-- | Try very hard to find an appropriate URL for the bibentry, DOIs are prefered +bibentryurl bib = safeHead $ catMaybes [doi, url] + where + fields = E.fields bib + doi = lookup "doi" fields >>= return . resolveDoi + url = lookup "url" fields + +-- | Format bibliography/references item +bibentry :: E.T -> Html () +bibentry bib = do + let fields = E.fields bib + a_ [href_ $ T.pack $ maybe "" id $ bibentryurl bib] $ maybeToHtml $ lookup "title" fields + ", " + maybeToHtml $ lookup "author" fields + ", " + maybeToHtml $ lookup "year" fields + +-- | References section +references :: [E.T] -> Html () +references attrib = do + section_ $ do + h2_ "References" + ol_ $ forM_ attrib (li_ . bibentry) + +page db attrib = doctypehtml_ $ do head_ $ do title_ "comatose" meta_ [charset_ "utf-8"] @@ -138,9 +163,15 @@ page db = doctypehtml_ $ do th_ "Year" th_ "Features" tbody_ $ forM_ (M.toList $ dalgos db) (protoentry db) + references (sortBy (compare `on` lookup "year" . E.fields) attrib) script_ "$(document).ready( function () { $('#algo').DataTable( { paging: false, \"columnDefs\": [ ] } ); } );" -render f db = renderToFile f (page db) +render f db attribution = renderToFile f (page db attribution) -main = getDataFileName "data/db.yaml" >>= readDb >>= render "comatose.html" +readAttributions = getDataFileName "data/attribution.bib" >>= parseFromFile file + +main = do + db <- getDataFileName "data/db.yaml" >>= readDb + (Right attribution) <- readAttributions + render "comatose.html" db attribution diff --git a/comatose.cabal b/comatose.cabal index 0847041..2225a8c 100644 --- a/comatose.cabal +++ b/comatose.cabal @@ -13,7 +13,7 @@ category: Web build-type: Simple -- extra-source-files: cabal-version: >=1.10 -data-files: data/db.yaml, data/db.bib +data-files: data/db.yaml, data/db.bib, data/attribution.bib executable comatose main-is: Main.hs diff --git a/data/attribution.bib b/data/attribution.bib new file mode 100644 index 0000000..40b284d --- /dev/null +++ b/data/attribution.bib @@ -0,0 +1,96 @@ +@article{suriyachai2012, + author = {Suriyachai, P. and Roedig, U. and Scott, A.}, + doi = {10.1109/SURV.2011.020211.00036}, + issn = {1553-877X}, + journaltitle = {Communications Surveys Tutorials, IEEE}, + keywords = {access protocols;wireless sensor networks;MAC protocols;WSN protocols;data transport;medium access control protocol;mission-critical applications;wireless sensor networks;Delay;Media Access Protocol;Mission critical systems;Monitoring;Reliability;Wireless sensor networks;Medium Access Control Protocols;Mission-Critical Applications;Quality of Service;Safety-Critical Applications;Survey;Time-Critical Applications;Wireless Sensor Networks;Wireless Sensor and Actuator Networks}, + month = {Second}, + number = {2}, + pages = {240-264}, + title = {A Survey of MAC Protocols for Mission-Critical Applications in Wireless Sensor Networks}, + volume = {14}, + year = {2012}, +} + +@article{gummalla2000, + author = {Gummalla, Ajay Chandra V. and Limb, John O.}, + doi = {10.1109/COMST.2000.5340799}, + file = {gummalla2000.pdf}, + issn = {1553-877X}, + journaltitle = {Communications Surveys Tutorials, IEEE}, + keywords = {Access protocols;Bandwidth;Communication cables;Media Access Protocol;Planets;Quality of service;Telephony;Wireless application protocol;Wireless networks;Wireless sensor networks}, + month = {Second}, + number = {2}, + pages = {2-15}, + title = {Wireless medium access control protocols}, + volume = {3}, + year = {2000}, +} + +@article{jurdak2004, + author = {Jurdak, R. and Lopes, C.V. and Baldi, P.}, + doi = {10.1109/COMST.2004.5342231}, + file = {jurdak2004.pdf}, + issn = {1553-877X}, + journaltitle = {Communications Surveys Tutorials, IEEE}, + keywords = {access protocols;ad hoc networks;telecommunication control;telecommunication network management;telecommunication network topology;telecommunication traffic;MAC layer protocols;channel separation;medium access control protocols;traffic load;transmission initiation;wireless ad hoc networks;wireless communications;wireless network control;wireless network management;Access protocols;Ad hoc networks;Communication system control;Media Access Protocol;Mobile ad hoc networks;Network topology;Proposals;Wireless application protocol;Wireless communication;Wireless networks}, + month = {First}, + number = {1}, + pages = {2-16}, + title = {A survey, classification and comparative analysis of medium access control protocols for ad hoc networks}, + volume = {6}, + year = {2004}, +} + +@article{demirkol2006, + author = {Demirkol, I. and Ersoy, C. and Alagoz, F.}, + doi = {10.1109/MCOM.2006.1632658}, + file = {demirkol2006.pdf}, + issn = {0163-6804}, + journaltitle = {Communications Magazine, IEEE}, + keywords = {access protocols;wireless sensor networks;MAC protocols;medium-access protocol;wireless sensor networks;Base stations;Broadcasting;Delay;Event detection;Media Access Protocol;Sensor phenomena and characterization;Sensor systems;Sleep;Wireless application protocol;Wireless sensor networks}, + month = {April}, + number = {4}, + pages = {115-121}, + title = {MAC protocols for wireless sensor networks: a survey}, + volume = {44}, + year = {2006}, +} + +@article{mo2008, + author = {Jeonghoon Mo and Hoi-Sheung So and Walrand, J.}, + doi = {10.1109/TMC.2007.1075}, + file = {mo2008.pdf}, + issn = {1536-1233}, + journaltitle = {Mobile Computing, IEEE Transactions on}, + keywords = {access protocols;delays;wireless LAN;common hopping protocol;dedicated control channel protocol;multichannel MAC protocols;parallel rendezvous protocols;protocol delay;protocol throughput;split phase protocol;802.11;Multi-Channel MAC;Performance}, + month = {Jan}, + number = {1}, + pages = {50-65}, + title = {Comparison of Multichannel MAC Protocols}, + volume = {7}, + year = {2008}, +} + +@article{kumar2014, + author = {Kumar Somappa, A.A. and Øvsthus, K. and Kristensen, L.M.}, + doi = {10.1109/SURV.2014.012114.00058}, + file = {kumar2014.pdf}, + issn = {1553-877X}, + journaltitle = {Communications Surveys Tutorials, IEEE}, + keywords = {protocols;telecommunication security;wireless sensor networks;WSN requirements;industrial automation;industrial equipment;industrial perspective;industrial plants;industry specific protocols;medium access control;representative protocols;security function;wireless sensor networks;Monitoring;Protocols;Quality of service;Routing;Standards;Wireless communication;Wireless sensor networks;Industrial automation;Medium Access Control;Routing;Security;Standards;Transport;Wireless Sensor and Actuator Networks}, + month = {Third}, + number = {3}, + pages = {1391-1412}, + title = {An Industrial Perspective on Wireless Sensor Networks – A Survey of Requirements, Protocols, and Challenges}, + volume = {16}, + year = {2014}, +} + +@online{macsoup, + author = {Langendoen, K.}, + title = {The MAC Alphabet Soup}, + url = {http://www.st.ewi.tudelft.nl/~koen/MACsoup/index.php}, + year = {2010}, +} + diff --git a/data/db.yaml b/data/db.yaml index b4765b9..051b101 100644 --- a/data/db.yaml +++ b/data/db.yaml @@ -4,7 +4,6 @@ # Available features # ================== - features: # XXX ? access: @@ -125,62 +124,8 @@ features: other.qos: name: QoS -# todo -# ^^^^ -# suriyachai2012: -# Performance Objectives: Energy (no, n/a, duty-cycling), delay (node-to-node/end-to-end decrease/probalistic guarantee/guarantee), reliability (no, node-to-node/end-to-end increase/guarantee) -# Assumptions: Deployment, Topology, Network Pattern, Cross-Layer Support, Transceiver - -# gummalla: -# Architecture: Distributed (Collision avoidance, random access), Centralized (random access, guaranteed access, hybrid access) - -# jurdak2004: -# Channels (single, multiple), Topology (single-hop, multi-hop, clustered, centralized), Transmission initiation (sender/receiver), Power efficient, Traffic load/scalabiliy, Range - -# demirkol2006: time sync needed, comm pattern support (all, convergecast), type (csma, np-csma, tdma/csma, csma/ca, tdma) adaptivity (good, weak) - -# mo2008 (only multichannel mac): dedicated control channel, common hopping, split phase, parallel rendezvous - -# kumar2014: fixed, demand, hybrid assignment, random access; design -# considerations: node deployment (topology?), control packet overhead, time -# synchronization (local/global), slot scheduling, duty-cycling, multi-channel, -# cross-layer support, channel utilization, node priority, collision avoidance -# Main classes are: energy-efficient, qos-aware, real-time - -# several: hard- vs soft real-time - -# pip: coordinated (tdma)/uncoordinated (tdma), centralized/distributed, -# single/multichannel, connection-oriented/-less - -# old -# ^^^ - -# Slot assignment strategies -# -------------------------- -# fixed: fixed (time/freq/…) slot assignment -# slot-reservation: nodes reserve slots for data-transmissions. While -# the actual data-transfer is collision-free the reservation is not -# token-passing: -# polling: - -# Topology -# -------- -# centralized -# cluster -# single-hop: mac layer relies on higher layers to transmit packet to out-of-range stations -# multi-hop - -# rtscts: rts/cts/data/ack slot reservation mechanism - -# distributed: Distributed access control - -# backoff: Uses exponential backoff in case of collisions -# carriersense: Station senses medium before sending - -# synchronized: A synchronized clock is required - -# fixed-slotsize: You name it. - +# Algorithms/Protocols +# ==================== algos: alohap: name: Pure ALOHA -- cgit v1.2.3