2013年3月31日星期日

ISO 镜像制作工具 - mkisofs

mkisofs - create an hybrid ISO-9660/JOLIET/HFS/UDF filesystem-image with optional Rock Ridge attributes.


mkisofs [ options ] [ -o filename ] pathspec [pathspec ...]
mkisofs [ options ] [ -o filename ] -find [find expression]

mkisofs -J -r -o output.iso dir_with_files/

通过管道 mkisofs 与 cdrecord相结合:
mkisofs -J -r dir_with_files/ | cdrecord dev=ATAPI:0,1,0 -v -multi -pad -data -
mkisofs -R /master/tree | cdrecord -v fs=6m speed=2 dev=2,0 -


mkisofs -r -J -T -V BackupData -o my1.iso /dir1 
"-J" 代表燒成 Joliet 格式 
"-T" 代表各目錄中放一個長檔名與 8.3 格式檔名對照表 
"-V BackupData" 代表燒好的光碟以 BackupData 為標籤名 
"my1.iso" is the first iso_9660 image file 
"/dir1" is the directory of files you are backing up 

freedb.org - 免费数据库

freedb.org - 免费 光碟数据库

freedb是一个光碟音轨清单数据库,所有内容均以GNU通用公共许可证发布,最初基于现时为专有软件的光碟数据库(下简称CDDB)

freedb主要用于媒体播放器、音频标签器与光碟提取器等软件,并由第6版协定起开始接受与回传UTF-8资料

其它数据库

MusicBrainz是一个自由音乐数据库,原初创始目的系针对CDDB中的限制,但如今已不再将目标局限于CD后设资料储存库,而扩大为一种结构化的“音乐维基百科

List of online music databases

桌面搜索

第一类:只索引目录及文件名称

http://www.voidtools.com/


第二类:索引文件内容

  • file and folder names
  • metadata, such as titles, authors, comments in file types such as MP3PDF and JPEG
  • file content (for supported types of documents only)

cdrecord.exe - 刻录命令行 - 可输入 ISO文件 或 光盘

cdrecord.exe - 刻录命令行


cdrecord dev=device imagefile.iso

http://fossies.org/dox/dvdrtools-0.3.1/ 源码文档


cdrecord [ general options ][ dev=device ][ track options ] track1...trackn
支持
Orange Book CD-recorder
DVD-recorder
BluRay-recorder

记录ISO文件命令
cdrecord -v speed=2 dev=/dev/cdrom -data /var/tmp/backup.iso
cdrecord -v -eject speed=4 dev=0,3,0 backup.iso
cdrecord -v -eject speed=8 dev=/dev/cdwriter driveropts=burnfree test.iso
driveropts=burnfree 启 动防缓存用光的刻录保护技术

Device naming

-scanbus 输出所有的SCSI设备列表
-dev 后跟设备名称(scsibus/target/lun

刻录模式选项

-dummy (测试之用)
The CD/DVD/BluRay-recorder will go through all steps of the recording process, but the laser is turned off during this procedure

-multi
-sao/-dao
-tao

-raw ----- 相当于指定 -raw96r
-raw96r
2352 byte sectors plus 96 bytes of raw P-W sub-channel data resulting in a sector size of 2448 bytes

-raw96p
2352 byte sectors plus 96 bytes of packed P-W sub-channel data resulting in a sector size of 2448 bytes

-raw16
2352 byte sectors plus 16 bytes of P-Q sub-channel data resulting in a sector size of 2368 bytes.




功能选项

-abort
-atip
blank=type  清空一张盘

-checkdrive 需要指定一个光驱 (-dev 3,0,0) 已经入上光盘后

scsidev: '3,0,0'
scsibus: 3 target: 0 lun: 0
Using libscg version 'schily-0.9'.
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'MATSHITA'
Identifikation : 'DVD-R   UJ-8A8  '
Revision       : 'HB14'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
Using generic SCSI-3/mmc-3 DVD+R driver (mmc_dvdplusr).
Driver flags   : NO-CD DVD MMC-3 SWABAUDIO BURNFREE
Supported modes: PACKET SAO
/cdrecord/cdrecord: Warning: Cannot read drive buffer.
/cdrecord/cdrecord: Warning: The DMA speed test has been skipped.


-clone   
cuefile=filename  CDRWIN-compliant CUE sheet file
The *.cue files are CD-structure description files introduced by CDRWIN.

defpregap=#

driver=name  指定刻录机,驱动程序
如:driver=help 打印出所有的驱动
mmc_dvdplus         generic SCSI-3/mmc-3 DVD+R/DVD+RW driver (checks media)

mmc_dvdplusr        generic SCSI-3/mmc-3 DVD+R driver
mmc_dvdplusrw       generic SCSI-3/mmc-3 DVD+RW driver


driveropts=option list
-eject   Eject disk after doing the work
-fix
-force

-format 格式化:CD-RW/DVD-RW/DVD+RW/BD-RE disc
fs=#  Set the FIFO (ring buffer) size to #
gracetime=#  (宽限期) 开始刻录倒计时?
-ignsize
-immed
-inq
-load
-lock

mcn=med_cat_nr  Media Catalog Number
minbuf=value

-minfo/-media-info  获取记录盘信息 data type/status/Size(扇区数)
Retrieve and print information about the state of the medium

Mounted media class:      DVD
Mounted media type:       DVD+R
Disk Is not erasable
data type:                standard
disk status:              empty
session status:           empty
BG format status:         none
first track:              1
number of sessions:       1
first track in last sess: 1
last track in last sess:  1
Disk Is not unrestricted (无限制/自由的)
Disk type: DVD, HD-DVD or BD
Disk appl. code: 0

Track  Sess Type   Start Addr End Addr   Size
==============================================
    1     1 Blank  0          2295103    2295104

Next writable address:              0
Remaining writable size:            2295104



-msinfo Retrieve multi-session info in a form

-noclose
-nofix

-overburn
Allow cdrecord to write more than the official size of a medium

-packet  Set Packet writing mode
pktsize=#

-prcap
print drive capabilities for MMC compliant drives

-setdropts  the speed of the drive and the dummy flag and exit
speed=#
-text
textfile=filename
-toc

-waiti
Wait for input to become available on standard input before trying to open the SCSI driver

-useinfo


SCSI 选项

dev=target

debug=#, -d
kdebug=#, kd=#
-reset
-scanbus
-silent-s  Do not print out a status report for failed SCSI commands.
timeout=#
ts=#  maximum transfer size for a single SCSI command

-V  the verbose level in respect of SCSI command transport by one
-VV will show data buffer content in addition


TRACK 选项

-audio   CD-DA (similar to Red Book) audio format
-data    CD-ROM mode 1 (Yellow Book) format

-cdi     TOC type for the disk is set to CDI
-copy  

index=list
-isosize
isrc=ISRC_number
-mode2
-nocopy

-preemp
-nopreemp

-noshorttrack
-shorttrack

-pad
padsize=#
-nopad

pregap=#
-scms
-swab
tsize=#

-xa
-xa1
-xa2
-xamix



例子:

Replicating an Audio CD

Replicating a simple CD-ROM/DVD-ROM/BD-ROM

Replicating a CD-ROM in clone mode

Creating an Audio CD

Creating a mixed Audio-Data CD

Creating a CD-ROM/DVD-ROM/BD-ROM

Setting drive options


术语,列表:

medium 媒介物,媒质



Track At Once mode 

光盘的刻录模式:
Disc-At-Once (DAO
Track-At-Once  (TAO
Session-At-Once  (SAO

scsibus/target/lun  General SCSI addressing 


Optical(光学) disc

光碟



Rock Ridge


针对 UNIX系统的 ISO-9660文件系统 ,支持文件名字母大小写、符号字符以及长文件名 
由于兼容 ISO -9660, 所以即使操作系统不支持 Rock Ridge, 也可以通过ISO-9660 查看。


Orange Book


Orange Book is the informal name for Philips and Sony's Recordable CD Standard

CD-WO, CD-MO (Magneto-Optic), and CD-RW (ReWritable)

Published in 1990, the Orange Book is a follow-up to their Red Book CD-DA (Compact Disc - Digital Audio) specifications. 

The Orange Book is divided into two sections:
Part I deals with magneto-optical (MO) drives
Part II deals with the first recordable CD format CD-R (Compact Disc - Recordable).
Part III, released separately, describes CD-RW (Compact Disc - Rewritable)

DVD 刻录光盘 刻录机

DVD 刻录光盘 刻录机


目前刻录技术分类

DVD论坛(目前的DVD格式标准主要有这个组织确定)认证的DVD刻录技术:

  • DVD-R
  • DVD-RW - Re-recordable DVD(可重记录型DVD)
  • DVD-R DL (Recordable Double layer)
  • DVD-ROM


DVD+RW Alliance组织研发的

  • DVD+R
  • DVD+RW - DVD-ReWritable(可重写式DVD)
  • DVD+R DL (Recordable Double layer)
光盘容量:4.7G(普通单面单层) 与  8.5G(单面双层刻录)。分别称作 5G盘 和 9G盘。

时序图 序列图 循序图

时序图(Sequence Diagram),亦称为序列图循序图,是一种UML行为图

描述对象之间发送消息的时间顺序  表示用例的行为顺序
显示多个对象之间的动态协作

当执行一个用例行为时  时序图中的每条消息
    对应了一个 类操作
    对应了一个 状态机中引起转换的触发事件


时序图包含四类元素,他们分别是:
  1. 对象 (Object)
  2. 生命线 (Lifeline)
  3. 消息 (Message)
  4. 激活 (Activation)

示例: goagent(一个代理软件)的时序图

goagent 的 时序图

计划学习列表

1.  boost asio 完成端口模型
2.  c++ i/o  stream 学习及用法
3.  字符串操作的学习
    CString / std::string
    c string 函数列表 - 宽/A 字符版本

4.  高精度计时器问题
    Performance Counter
    Performance Frequency

    GetTickCount

5.  造成死锁的 条件:
    必须是多线程
    必须在不同纯种里,使用了某种同步方式:如互斥体等等。
    同步方式有哪些?

统一建模语言 - UML

Unified Modeling Language
UML的本意是要成为一种标准的统一语言,使得IT专业人员能够进行计算机应用程序的建模
UML与程序设计语言无关。
UML符号集只是一种语言。(而不是一种方法学)
图是一系列的元素,这些元素常常被画成用点(事物)和弧(关系)相连的图。利用图来从不同的视角来观察系统

用于:对象导向分析

UML是一种定义良好、易于表达、功能强大且普遍适用的建模语言。

UML图,包括用例图、协作图、活动图、序列图、部署图、构件图、类图、状态图,是模型中信息的图形表达方式


重要内容可以由下列五类图(共9种图形)来定义
第一类是用例图,从用户角度描述系统功能,并指出各功能的操作者
第二类是静态图 (Static diagram),包括类图、对象图和包图

第三类是行为图(Behavior diagram),描述系统的动态模型和组成对象间的交互关系
第四类是交互图(Interactive diagram),描述对象间的交互关系
第五类是实现图 ( Implementation diagram )。
       其中构件图描述代码部件的物理结构及各部件之间的依赖关系。


在UML系统开发中有三个主要的模型:
  • 功能模型:从用户的角度展示系统的功能,包括用例图。
  • 对象模型:采用对象,属性,操作,关联等概念展示系统的结构和基础,包括类别图。
  • 动态模型:展现系统的内部行为。包括序列图,活动图,状态图。

表示系统的静态部分 的图 - 结构化图
1.          类图(Class Diagram)          类、接口和协作
2.          对象图(Object Diagram)       对象
3.          组件图(Compoment Diagram)   组件
4.          分布图(Deployment Diagram)   节点(Notes
表示系统动态 的图 - 动作图
1.          Usecase
2.          序列图(Sequence Diagram)
3.          协作图(Collaboration Diagram)
4.          状态图(Statechart Diagram)
5.          活动图(Activity Diagram)

组成UML有三种基本的建筑块
1、事物(Things
       1、结构事物(Structural things
       2
、动作事物(Behavioral things
       3
、分组事物(Grouping things
       4
、注释事物(Annotational things

2
、关系(Relationships
       1. 依赖(Dependencies 
       

        2. 关联(Association
  
      

        3.  一般化(generalization
 
       

       4.  实现(realuzation) 
 
3
、图(Diagrams
       1、类图(class diagram
       2
、对象图(class diagram
       3
Use case diagram
       4
Sequence diagram
       5
Collaboration diagram
       6
Statechart diagram
       7
Activity diagram
       8
Compomnent diagram
       9
Deployment diagram


为了要保持工程图的传统,在您的 UML 图上加注用途、约束、或意图永远无伤大雅。


术语列表

建模
建立系统模型的过程。又称模型化。建模是研究系统的重要手段和前提。凡是用模型描述系统的因果关系或相互关系的过程都属于建模

模型描述图(diagram)
最常用的UML图包括:用例图、类图、序列图、状态图、活动图、组件图和部署图


学习链接: