Skip to content
프로젝트

brunnojob/ofs2x-offshore-operations

GitHub에서 보기

소개

해양 작업 인력의 자격, 집합 장소 배치, 훈련 일정 및 감사를 관리하는 C++20 코어입니다.

개발 도구

이 수치를 측정하는 방법

What you can do

  • Crew registration, activation and vessel assignment.
  • Station rules with staffing minimums and required certificates.
  • Certificate expiry checks against Unix timestamps.
  • Vessel isolation and prevention of simultaneous station assignments.

측정된 스타 증가

in 24h
0
in 7 days
기록 수집 중
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

OFS2X Offshore Operations created by RF SOLUTIONS OFFSHORE and plublish by Team

A native C++20 command-line engine for offshore crew management, emergency station staffing and timed safety drills. Its domain model enforces vessel-specific eligibility, certificate requirements and auditable attendance.

Reference dashboard video

This recording shows the reference offshore dashboard. The implementation in this repository is a native C++20 CLI.

Watch the reference dashboard

Download the MP4

Watch the second reference dashboard recording

The original recording is stored in evidence/demo.mp4; its checksum is recorded in evidence/provenance.json.

Features

  • Crew registration, activation and vessel assignment.
  • Station rules with staffing minimums and required certificates.
  • Certificate expiry checks against Unix timestamps.
  • Vessel isolation and prevention of simultaneous station assignments.
  • Idempotent attendance, station occupancy and staffing shortages.
  • Monotonic drill duration and prevention of completed drill ID reuse.
  • Ordered audit events with an extensible repository interface.
  • Mutex-protected operations and an independently synchronized memory repository.
  • Input validation, structured status reporting and native regression tests.

Requirements

A C++20 compiler (GCC 12+ recommended), GNU Make and a compatible host environment. Python 3 is required for the CLI regression tests.

Build and test

make all test
./build/offshore

Example session

crew alice vessel-1 1 BST 2000000000
crew bob vessel-1 1 BST 2000000000
station muster 2 BST
start drill-1 vessel-1
check-in alice muster 1800000000
status
check-in bob muster 1800000000
status
finish
audit
quit

After the first check-in, status prints:

active
muster 1/2 shortage=1

After the second check-in, it prints muster 2/2 shortage=0. The duration printed by finish depends on elapsed time.

Use help to print the command syntax. Blank lines are ignored. Unexpected arguments are rejected before the command runs. Errors go to stderr; the CLI continues processing input and exits with status 1 if any command failed or an input read error occurred. An eligibility denial is a normal decision and does not set the error exit status.

Command Purpose
crew ID VESSEL ENABLED [CERT EXPIRY]... Register or update crew.
station ID MINIMUM [CERT]... Configure station requirements.
start ID VESSEL Start a vessel drill.
check-in CREW STATION UNIX_SECONDS Validate and register attendance.
status Print headcounts and shortages.
finish Finish the drill and report elapsed time.
audit Display sequential audit events.
help Show command usage.
quit Close the program.

Configuration is locked during active drills. Certificate expiry values must be greater than the non-negative check-in timestamp.

Project structure

include/operations.hpp     Domain model and audit repository contract
src/main.cpp               Command-line application
tests/test.cpp             Domain regression suite
tests/cli_test.py          CLI regression suite
docs/persistence.md        Persistence design notes
evidence/demo.mp4          Original demonstration
evidence/preview.jpg       Video cover image
.github/workflows/ci.yml   Native CI checks
Makefile                   Build and tests

Architecture

The operations core is separate from the terminal interface. It stores crew, station rules and the active drill in memory. Repository defines audit event storage; MemoryRepository is its default adapter. Audit events are appended before operational state changes. An adapter must append completely or throw without side effects. This implementation does not provide transactional atomicity between audit storage and in-memory state: a later allocation failure can leave an event without a completed state change.

This is an in-memory implementation. It does not restore state across application restarts, connect to a maritime authority or verify externally issued credentials. For durable storage requirements, see persistence design.

Credits

Developed by Brunno — brunnodev.store.

Released under the MIT License.

관련 프로젝트 살펴보기

불러오는 중…